reportViewer最简单问题
winform 中如何将查询出的数据(DataSet或DataTable)显示在reportViewer?
我按以下方法做的,无任何效果,也不报错:
1、加了Report1.rdlc,reportViewer1数据源选择好了Report1.rdlc
2、代码:
DataSet DataSet1 = Class1.GetDataOLEDB("select * from tab_FundStatus");
BindingSource BindingSource1 = new BindingSource();
BindingSource1.DataSource = DataSet1;
ReportDataSource ReportDataSource1 = new ReportDataSource();
ReportDataSource1.Value = BindingSource1;
this.reportViewer1.LocalReport.DataSources.Add(ReportDataSource1);
this.reportViewer1.RefreshReport();