Programmatically Insert Page Break in ActiveReports

时光总嘲笑我的痴心妄想 提交于 2019-12-14 03:47:00

问题


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!


回答1:


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

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:

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.

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.

Hope this helps!

EDIT : Links fixed



来源:https://stackoverflow.com/questions/2619698/programmatically-insert-page-break-in-activereports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!