日期:2014-05-19  浏览次数:20805 次

reportViewer最简单问题(vs2005 C#)
winform   中如何将查询出的数据(DataSet或DataTable)显示在reportViewer?

我按以下方法做的,无任何效果,也不报错:
1、加了Report1.rdlc,reportViewer1数据源选择好了Report1.rdlc
2、代码:
BindingSource   BindingSource1   =   new   BindingSource();

BindingSource1.DataSource   =   DataSet1;//DataSet1在前面已加载,无误

ReportDataSource   ReportDataSource1   =   new   ReportDataSource();

ReportDataSource1.Value   =   BindingSource1;

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

this.reportViewer1.RefreshReport();


------解决方案--------------------
up
------解决方案--------------------
DataSet1是否被释放了