ReportDataSource Class
Represents a data source for a report.
Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in Microsoft.ReportViewer.WinForms.dll)
Inheritance Hierarchy
System.Object
Microsoft.Reporting.WinForms.ReportDataSource
Syntax
public sealed class ReportDataSource
public ref class ReportDataSource sealed
[<Sealed>]
type ReportDataSource = class end
Public NotInheritable Class ReportDataSource
Constructors
Name | Description | |
---|---|---|
ReportDataSource() | Constructs an empty data source. |
|
ReportDataSource(String) | Constructs a named data source. |
|
ReportDataSource(String, BindingSource) | Constructs a named data source with a BindingSource object in the Value property. |
|
ReportDataSource(String, DataTable) | Constructs a named data source with a DataTable object in the Value property. |
|
ReportDataSource(String, IEnumerable) | Constructs a named data source with an IEnumerable object in the Value property. |
|
ReportDataSource(String, Object) | Constructs a named data source with a value. |
|
ReportDataSource(String, Type) | Constructs a named data source with the Value property initialized as a particular type. |
Properties
Name | Description | |
---|---|---|
Name | Gets or sets the name of the report data source. |
|
Value | Gets or sets the instance of the report data source. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
Remarks
The ReportDataSource class is used with the DataSources collection of a LocalReport object to add one or more required data sources to a local report. This is necessary when adding a report to the ReportViewer control.
Examples
Legacy Code Example
For code examples, see LocalReport.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.Reporting.WinForms Namespace
Return to top