共用方式為


ReportDataSource 類別

代表報表的資料來源。

繼承階層

System.Object
  Microsoft.Reporting.WinForms.ReportDataSource

命名空間:  Microsoft.Reporting.WinForms
組件:  Microsoft.ReportViewer.WinForms (在 Microsoft.ReportViewer.WinForms.dll 中)

語法

'宣告
Public NotInheritable Class ReportDataSource
'用途
Dim instance As ReportDataSource
public sealed class ReportDataSource
public ref class ReportDataSource sealed
[<SealedAttribute>]
type ReportDataSource =  class end
public final class ReportDataSource

ReportDataSource 型別公開下列成員。

建構函式

  名稱 說明
公用方法 ReportDataSource() 建構空的資料來源。
公用方法 ReportDataSource(String) 建構具名資料來源。
公用方法 ReportDataSource(String, IEnumerable) 使用 Value 屬性中的 IEnumerable 物件,建構具名資料來源。
公用方法 ReportDataSource(String, DataTable) 使用 Value 屬性中的 DataTable 物件,建構具名資料來源。
公用方法 ReportDataSource(String, Object) 以值來建構具名資料來源。
公用方法 ReportDataSource(String, Type) Value 屬性初始化為特定型別,建構具名資料來源。
公用方法 ReportDataSource(String, BindingSource) 使用 Value 屬性中的 BindingSource 物件,建構具名資料來源。

上層

屬性

  名稱 說明
公用屬性 Name 取得或設定報表資料來源的名稱。
公用屬性 Value 取得或設定報表資料來源的執行個體。

上層

方法

  名稱 說明
公用方法 Equals (繼承自 Object。)
受保護的方法 Finalize (繼承自 Object。)
公用方法 GetHashCode (繼承自 Object。)
公用方法 GetType (繼承自 Object。)
受保護的方法 MemberwiseClone (繼承自 Object。)
公用方法 ToString (繼承自 Object。)

上層

備註

ReportDataSource 類別用來搭配 LocalReport 物件的 DataSources 集合,以將一個或多個必要的資料來源加入本機報表中。將報表加入 ReportViewer 控制項時,這是必要的。

範例

如需程式碼範例,請參閱 LocalReport

執行緒安全性

這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。

請參閱

參考

Microsoft.Reporting.WinForms 命名空間