动态生成数据集列,rdlc报告在c#winforms中

时间:2017-06-13 11:57:13

标签: c# winforms datatable dataset rdlc

我的任务是创建一个rdlc报告,其中包含动态列(其数字不断变化)。我有一个数据表,其中包含列数和行数(数据)。现在我需要动态创建数据集和rdlc报告(rdlc wisard)。

我已尝试使用此代码,但直到现在还没有运气。 ds3是一个包含数据表的数据集。

this.reportViewer1.Reset();
this.reportViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc");
ReportDataSource rds = new ReportDataSource("ds1", ds3);
this.reportViewer1.LocalReport.DataSources.Clear();
this.reportViewer1.LocalReport.DataSources.Add(rds);
this.reportViewer1.DataBind();
this.reportViewer1.LocalReport.Refresh();

0 个答案:

没有答案
相关问题