以编程方式在 ActiveReports 中插入分页符 [英] Programmatically Insert Page Break in ActiveReports

查看:47
本文介绍了以编程方式在 ActiveReports 中插入分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在网上搜索一个很好的例子,但无法弄清楚如何以编程方式向 ActiveReports 报告添加分页符.我正在处理的报告通常需要每条记录 1-2 页.为了支持报表的双面打印,我想为每条使用奇数页的记录插入一个空白页,确保每条新记录都打印在每个打印页的正面.

I've been scouring the web for a good example, but cannot figure out how to add a page break to an ActiveReports report programmatically. The reports I'm working with usually require 1-2 pages for each record. In order to support dual-sided printing of the reports I want to insert a blank page for each record that uses an odd number of pages, ensuring that each new record is printed on the front of each printed page.

我对 ActiveReports 非常陌生,因此非常感谢任何建议、代码示例或链接!

I'm very new to ActiveReports, so any suggestions, code samples, or links are much appreciated!

推荐答案

有两种方法可以做到这一点,最佳选择取决于数据和您的报告.

There are two ways to do this and the best option depends on the data and your report.

选项 1:分页控制您可以将 PageBreak 控件添加到报表的特定位置,并以编程方式设置 PageBreak 控件的 Enabled 属性以确定它是否创建分页符.请参阅此页面 有关 PageBreak 控件的 Enabled 属性的文档:

Option 1: Page Break Control You can add the PageBreak control to the report in a specific location and programatically set the Enabled property of the PageBreak control to determine whether it creates a page break or not. See this page for documentation on the Enabled property of the PageBreak control:

选项 2:Section.New Page另一种选择是使用该部分的 NewPage 属性.在这种情况下,您可以设置 Detail 或 GroupHeader 或 GroupFooter 部分的 NewPage 属性来触发分页符.尝试从该部分的 Format 事件中设置它.请参阅此页面 有关 NewPage 属性的文档.

Option 2: Section.New Page The other option is to use the NewPage property of the section. In this case you can set the NewPage property of the Detail or GroupHeader or GroupFooter section to trigger a page break. Try setting it from the Format event of the section. See this page for documentation on the NewPage property.

GrapeCity 网站上专门提供 ActiveReports 支持的支持论坛非常活跃并且也是获取有关 ActiveReports 的建议和帮助的好方法.

The support forums dedicated to ActiveReports support on the GrapeCity website are active and also a great way to get suggestions and help on ActiveReports.

希望这会有所帮助!

链接已修复

这篇关于以编程方式在 ActiveReports 中插入分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆