VS2010使用Report

1.添加报表查看控件

this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer();

2.添加报表源并装载报表源

reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource();

this.reportViewer1.LocalReport.DataSources.Add(reportDataSource1);

3.添加绑定源

this._TBLBindingSource = new System.Windows.Forms.BindingSource(this.components)

4.为报表数据源添加绑定的源数据

reportDataSource1.Value = this._TBLBindingSource;

5.为绑定源制定数据源

this._TBLBindingSource.DataSource=ds;

你可能感兴趣的:(VS2010)