4

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.

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

4

1 回答 1

11

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

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

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

GrapeCity 网站上专门用于 ActiveReports 支持的支持论坛很活跃,也是获取有关 ActiveReports 的建议和帮助的好方法。

希望这可以帮助!

编辑:链接固定

于 2010-04-12T18:35:36.177 回答