ReportDataSource 類別
代表報表的資料來源。
繼承階層架構
Object
Microsoft.Reporting.WinForms.ReportDataSource
命名空間: Microsoft.Reporting.WinForms
組件: Microsoft.ReportViewer.WinForms (在 Microsoft.ReportViewer.WinForms.dll 中)
語法
'宣告
Public NotInheritable Class ReportDataSource
public sealed class ReportDataSource
public ref class ReportDataSource sealed
[<Sealed>]
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)。 |
![]() |
GetHashCode | 做為預設雜湊函式。 (繼承自 Object)。 |
![]() |
GetType | 取得目前實例 Type 的屬性。 (繼承自 Object)。 |
![]() |
ToString | 傳回代表目前物件的字串。 (繼承自 Object)。 |
回頁首
備註
ReportDataSource 類別用來搭配 LocalReport 物件的 DataSources 集合,以將一個或多個必要的資料來源加入本機報表中。將報表加入 ReportViewer 控制項時,這是必要的。
範例
如需程式碼範例,請參閱 LocalReport。
執行緒安全
這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。