次の方法で共有


ReportDataSource コンストラクタ (String, Object)

Constructs a named data source with a value.

名前空間: Microsoft.Reporting.WinForms
アセンブリ: Microsoft.ReportViewer.WinForms (microsoft.reportviewer.winforms.dll 内)

構文

'宣言
'使用

パラメータ

  • name
    The name of the data source.
  • dataSourceValue
    A value for the data source.

解説

Value may be an instance of System.Data.DataTable, a System.Collections.IEnumerable value (for example, System.Data.DataView or System.Array), a System.Windows.Forms.BindingSource (for the Microsoft Windows Form control), or a System.Web.UI.IDataSource (for the ASP.NET server control).

If this value is an instance of System.Collections.IEnumerable, all elements in the collection must be of the same type, and names of the public properties of the element (as retrieved by the System.ComponentModel.TypeDescriptor.GetProperties() method) must match the field names of the corresponding report data source.

Value may also be an instance of System.Type. In this case, an instance of the supplied type is automatically created and added to an automatically created collection.

If the type of Value is not any of the aforementioned types, it is added to an automatically created collection.

For code examples, see LocalReport for code examples.

参照

リファレンス

ReportDataSource クラス
ReportDataSource メンバ
Microsoft.Reporting.WinForms 名前空間