phinex 发表于 2015-7-30 16:43:00

SectionReport 如何在web端绑定报表文件和数据源?

很多例子都是pagereport的,那么RDL报表如何在web端使用?

frank.zhang 发表于 2015-7-30 17:11:00

您好,
首先回答您正文里的问题,
页面报表和RDL报表是调用方法完全相同的两种报表。唯一的区别在于使用的场景。
页面报表有个严格的页面格式,适合于对页面格式严格的打印。
具体的区别您可以参考:

ActiveReports入门教程(3) 选择最佳的开发实践
http://gcdn.gcpowertools.com.cn/showtopic-17065.html

区域报表在Web中的使用:
WEB显示区域报表(基于代码):
Reports.rptMonthlySalesByCategory rpt = new Reports.rptMonthlySalesByCategory();
WebViewer1.Report = rpt;

WEB显示区域报表 (基于XML):
GrapeCity.ActiveReports.SectionReport sr = new GrapeCity.ActiveReports.SectionReport();
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Server.MapPath("") + "\\SectionReport1.rpx");
sr.LoadLayout(xtr);
xtr.Close();
WebViewer1.Report = sr;

区域报表绑定数据源,我们有相关博客专门介绍,您可以参考下:
区域报表设计时数据源绑定
http://blog.gcpowertools.com.cn/post/2014/08/01/ActiveReports_DataSource_DesignTime.aspx

区域报表运行时数据源绑定
http://blog.gcpowertools.com.cn/post/2014/08/01/ActiveReports_DataSource_RunTime.aspx

区域报表的子报表
http://blog.gcpowertools.com.cn/post/2014/06/24/AR_SectionReport_SubReport.aspx

希望能够帮助到您。

frank.zhang 发表于 2015-8-7 17:39:00

为了给你提供更优质的服务,请对本次服务进行评分。
我们会认真对待你提出的宝贵意见,谢谢
http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页: [1]
查看完整版本: SectionReport 如何在web端绑定报表文件和数据源?