0
votes

I am looking for some examples of programmatically setting up a page break in my report.

I need to start a new page after so much data is populated on the report. I am using VS 2010 and c#.

Very new to Active Reports and cannot seem to find much documentation on its api.

Any code examples of showing how set set up a new page in a report would be nice.

I have tried the Detail.NewPage = NewPage.After, but 1st page looks fine and populates n records, but any others after only populate 1 record versus it should be populating n amount of records.

Now, I am trying to use PageBreak instead but not sure how to use.

Thanks

1

1 Answers

0
votes

As per my understanding of the issue you wish to show a desired number of rows on each page and then add a PageBreak, hereby pushing the rest of the data on new page.

You can restrict the number or rows per page through the following way:

  1. Add a pagebreak at the end of the detail section.
  2. set a flag value to track current record and set it to 0 in report start event.
  3. In Format event of the Detail Section, increase the flag value and check: if flag value is 1 then disable the PageBreak. if the flag value is equal to assigned rows then enable page break and set flag value to 0.

This way the pagebreak will be enable after every desired number of rows and the rest of records will be pushed to the next pages and this continues.

Regards, Mohita