Programmatically insert page break in ActiveReports

I am good on the Internet, but I canโ€™t figure out how to programmatically add a page break to an ActiveReports post. For the reports I work for, it usually takes 1-2 pages for each post. To support two-sided printing of 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 at the beginning of each printed page.

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

+4
source share
1 answer

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

Option 1: Control the page break You can add the PageBreak control to the report in a specific place and programmatically 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 Another 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 start the page break. Try installing it from the Format section event. See this page for documentation on the NewPage property.

Support forums support ActiveReports support on the GrapeCity website , as well as a great way to get suggestions and help with ActiveReports.

Hope this helps!

EDIT: fixed links

+11
source

Source: https://habr.com/ru/post/1306644/


All Articles