chenc 发表于 2015-12-15 10:33:00

特殊情况Word导出

当报表设计器连接数据源的类型设置为DataSet Provider类型,数据源需要从后台赋值,这种情况下,原报表导出方法就会不适用,运行的时候报出异常,请问如何在后台导出方法里给报表设计器重新指定DataSet

frank.zhang 发表于 2015-12-15 11:56:00

您好,

GrapeCity.ActiveReports.PageReport report = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("") + "\\CustomWebExporting.rdlx"));
GrapeCity.ActiveReports.Document.PageDocument reportDocument = new GrapeCity.ActiveReports.Document.PageDocument(report);


在reportDocument 中提供了LocateDataSource 的方法。

如果没有解决问题,需要您上传一个能够重现这个问题的例子程序。

chenc 发表于 2015-12-15 14:06:00

回复 2楼frank.zhang的帖子

你好,你所提供的解决方案很好的解决了我遇到的问题,太感谢了

frank.zhang 发表于 2015-12-15 17:44:00

好的。

不客气
页: [1]
查看完整版本: 特殊情况Word导出