grape_puppet 发表于 2016-1-25 16:06:00

后台数据怎么显示到报表模板上?

我后台有一个字符串,怎么将它显示到报表的一个TextBox上?

Lenka.Guo 发表于 2016-1-25 17:24:00

您好,

如果是字符串的话,可通过报表参数将数据显示在报表模板

grape_puppet 发表于 2016-1-25 18:07:00

回复 2楼Lenka.Guo的帖子

参数怎么使用,有没有相关文档?

Lenka.Guo 发表于 2016-1-25 18:46:00

1. 设计报表模板时,添加报表参数, 并赋值给TextBox(点Value属性,选择表达式,点击参数,点插入);




2. 在后台加载报表时,为参数赋值:
GrapeCity.ActiveReports.PageReport report1 = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("/Reports/PageReport1.rdlx")));
            //report1.Document.LocateDataSource += new GrapeCity.ActiveReports.LocateDataSourceEventHandler(Document_LocateDataSource);
            report1.Report.ReportParameters.DefaultValue.Values.Clear();
             report1.Report.ReportParameters.DefaultValue.Values.Add("testing");

grape_puppet 发表于 2016-1-27 16:23:00

感谢,问题已解决。

Lenka.Guo 发表于 2016-1-27 18:05:00

没事,解决了就好~

Lenka.Guo 发表于 2016-2-15 14:37:00

回复 5楼grape_puppet的帖子



为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢

http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页: [1]
查看完整版本: 后台数据怎么显示到报表模板上?