ReportDataSource 类

表示报表的数据源。

继承层次结构

Object
  Microsoft.Reporting.WebForms.ReportDataSource

命名空间:  Microsoft.Reporting.WebForms
程序集:  Microsoft.ReportViewer.WebForms(在 Microsoft.ReportViewer.WebForms.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, String) 构造带有数据源 ID 的命名数据源。
公共方法 ReportDataSource(String, IDataSource) 使用 Value 属性中的 IDataSource 构造命名数据源。

页首

属性

  名称 说明
公共属性 DataMember 指定要绑定的数据列表的名称。
公共属性 DataSourceId 获取或设置数据源 ID。
公共属性 Name 获取或设置报表数据源的名称。
公共属性 Value 获取或设置报表数据源实例。

页首

方法

  名称 说明
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

ReportDataSource 类用于 LocalReport 对象的 DataSources 集合,以便为本地报表添加一个或多个必需的数据源。在向 ReportViewer 控件添加报表时,必须这样做。

示例

有关代码示例,请参见 LocalReport

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.Reporting.WebForms 命名空间