ReportDataSource 類別

 

發行︰ 2016年4月

代表報表的資料來源。

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

繼承階層

System.Object
  Microsoft.Reporting.WinForms.ReportDataSource

語法

public sealed class ReportDataSource
public ref class ReportDataSource sealed 
[<Sealed>]
type ReportDataSource = class end
Public NotInheritable Class ReportDataSource

建構函式

名稱 描述
System_CAPS_pubmethod ReportDataSource()

建構空的資料來源。

System_CAPS_pubmethod ReportDataSource(String)

建構具名資料來源。

System_CAPS_pubmethod ReportDataSource(String, BindingSource)

使用 Value 屬性中的 BindingSource 物件,建構具名資料來源。

System_CAPS_pubmethod ReportDataSource(String, DataTable)

使用 Value 屬性中的 DataTable 物件,建構具名資料來源。

System_CAPS_pubmethod ReportDataSource(String, IEnumerable)

使用 Value 屬性中的 IEnumerable 物件,建構具名資料來源。

System_CAPS_pubmethod ReportDataSource(String, Object)

以值來建構具名資料來源。

System_CAPS_pubmethod ReportDataSource(String, Type)

Value 屬性初始化為特定型別,建構具名資料來源。

屬性

名稱 描述
System_CAPS_pubproperty Name

取得或設定報表資料來源的名稱。

System_CAPS_pubproperty Value

取得或設定報表資料來源的執行個體。

方法

名稱 描述
System_CAPS_pubmethod Equals(Object)

(繼承自 Object。)

System_CAPS_pubmethod GetHashCode()

(繼承自 Object。)

System_CAPS_pubmethod GetType()

(繼承自 Object。)

System_CAPS_pubmethod ToString()

(繼承自 Object。)

註解

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

範例

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

執行緒安全

此類型的任何 public static (在 Visual Basic 中 共用 在 Visual Basic 中) 成員皆為安全執行緒。不保證任何執行個體成員為安全執行緒。

另請參閱

Microsoft.Reporting.WinForms 命名空間

回到頁首