共用方式為


ReportDataSource 類別

代表報表的資料來源。

繼承階層

System.Object
  Microsoft.Reporting.WebForms.ReportDataSource

命名空間:  Microsoft.Reporting.WebForms
組件:  Microsoft.ReportViewer.WebForms (在 Microsoft.ReportViewer.WebForms.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, String) 以資料來源識別碼來建構具名資料來源。
公用方法 ReportDataSource(String, IDataSource) 使用 Value 屬性中的 IDataSource,建構具名資料來源。

上層

屬性

  名稱 說明
公用屬性 DataMember 指定用來繫結的資料清單名稱。
公用屬性 DataSourceId 取得或設定資料來源識別碼。
公用屬性 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.WebForms 命名空間