将数据表绑定到rdlc报告

时间:2017-06-19 01:58:33

标签: c# rdlc

我想将datatable绑定到rdlc报告。

  • 但我的datatable字段的名称包含特殊字母,例如 avg(%)
  • 我无法更改字段名称。
  • 我无法在xsd.file
  • 中设置相同的字段名称
  • xsd.file中的字段名称与dataTable中的字段名称不同。

因此,我无法将datatable绑定到rdlc报告。

以下是我的代码:

LocalReport report = new LocalReport();
report.SetParameters(new ReportParameter("name"), name));
... (???)
report.DataSources.Add(new ReportDataSource("Student", dt as DataTable));

请帮帮我。

0 个答案:

没有答案
相关问题