页面报表中如何将A票的页加到B票中去
本帖最后由 Lenka.Guo 于 2016-9-19 17:03 编辑类似于区域报表中如将A票的页加到B票中去 objSectionReportB.Document.Pages.AddRange(objSectionReportA.Document.Pages()),页面报表怎么获取不到Document.Pages()这样的属性啊,要怎么实现啊?
Pages相当于是一个集合,所以使用Pages()访问是不正确的,应该以Document.Pages来访问:
正确写法:
rptOne rpt1 = new rptOne();
rpt1.Run();
rptTwo rpt2 = new rptTwo();
rpt2.Run();
rpt1.Document.Pages.AddRange(new GrapeCity.ActiveReports.Document.Section.Page[]
{rpt2.Document.Pages,rpt2.Document.Pages} );
viewer1.Document = rpt1.Document;
这里的rptOne,rptTwo 类型应该都是sectionreport吧,如果是pagereport呢,怎么加Pages集合? 814466854 发表于 2016-9-19 17:12
这里的rptOne,rptTwo 类型应该都是sectionreport吧,如果是pagereport呢,怎么加Pages集合?
抱歉页面报表中并不支持两个报表的合并,暂有的解决方案是将两个报表导为PDF文件之后合并或是在页面报表中添加多页布局。
详情可参考博客: http://blog.gcpowertools.com.cn/post/CombineReport.aspx
好的,那我还是用区域报表吧,thank you! 814466854 发表于 2016-9-20 08:21
好的,那我还是用区域报表吧,thank you!
No Thanks~
页:
[1]