lywb 发表于 2019-1-15 10:25:56

报表参数问题

我在报表中定义了一个参数ID,但是这个ID是从其它页面传参带过来的,报表所在页面怎么能接收到这个参数,做为查询条件

KearneyKang 发表于 2019-1-15 11:45:58

你的意思就是你的参数是前端传过来的,然后给报表的参数赋值。我这样理解的对吗?

lywb 发表于 2019-1-15 11:50:14

KearneyKang 发表于 2019-1-15 11:45
你的意思就是你的参数是前端传过来的,然后给报表的参数赋值。我这样理解的对吗?

对的,怎么操作呢??

KearneyKang 发表于 2019-1-15 11:55:33

你好,如果是网页端的话,并且是Web界面可以参考这个博客:https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=48869&extra=page%3D2

如果是H5的话可以参考这个博客:https://www.grapecity.com.cn/blogs/html5viewerparameter

lywb 发表于 2019-1-16 08:13:02

KearneyKang 发表于 2019-1-15 11:55
你好,如果是网页端的话,并且是Web界面可以参考这个博客:https://gcdn.grapecity.com.cn/forum.php?mod=v ...

GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(@"Report\CJSGS\饮用水日常检验报告.rdlx"));
                    rpt.Report.ReportParameters.DefaultValue.Values.Add(strKey);
                    WebViewer1.Report = rpt;

错误提示:

lywb 发表于 2019-1-16 08:14:23


找不到这个报表的路径。

这是我项目所在路径,

KearneyKang 发表于 2019-1-16 09:14:32

B/S端的话,读取报表你换这句代码:   GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath(@"Reports/RdlReport1.rdlx")));
页: [1]
查看完整版本: 报表参数问题