表示报表的数据源。
继承层次结构
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 类型公开以下成员。
构造函数
| 名称 | 说明 | |
|---|---|---|
| .gif) | ReportDataSource() | 构造空的数据源。 | 
| .gif) | ReportDataSource(String) | 构造命名数据源。 | 
| .gif) | ReportDataSource(String, IEnumerable) | 使用 Value 属性中的 IEnumerable 构造命名数据源。 | 
| .gif) | ReportDataSource(String, DataTable) | 使用 Value 属性中的 DataTable 构造命名数据源。 | 
| .gif) | ReportDataSource(String, Object) | 使用值构造命名数据源。 | 
| .gif) | ReportDataSource(String, String) | 构造带有数据源 ID 的命名数据源。 | 
| .gif) | ReportDataSource(String, IDataSource) | 使用 Value 属性中的 IDataSource 构造命名数据源。 | 
页首
属性
| 名称 | 说明 | |
|---|---|---|
| .gif) | DataMember | 指定要绑定的数据列表的名称。 | 
| .gif) | DataSourceId | 获取或设置数据源 ID。 | 
| .gif) | Name | 获取或设置报表数据源的名称。 | 
| .gif) | Value | 获取或设置报表数据源实例。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
| .gif) | Equals | (从 Object 继承。) | 
| .gif) | Finalize | (从 Object 继承。) | 
| .gif) | GetHashCode | (从 Object 继承。) | 
| .gif) | GetType | (从 Object 继承。) | 
| .gif) | MemberwiseClone | (从 Object 继承。) | 
| .gif) | ToString | (从 Object 继承。) | 
页首
注释
ReportDataSource 类用于 LocalReport 对象的 DataSources 集合,以便为本地报表添加一个或多个必需的数据源。在向 ReportViewer 控件添加报表时,必须这样做。
示例
有关代码示例,请参见 LocalReport。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。