Manual Page Breaks For Multi-Line Rows

mwilliams
edited February 11, 2022 in Analytics #1
BIRT 2.6.2 has improved page breaking in that the pageBreak events are called when you reach the end of a page, not when the pageBreakInterval is met. Prior to 2.6.2, row counts were not reset and pageNumbers were not incremented for use in TOC's and such. You would end up with incorrect page numbers if you had multi line rows that didn't reach the limit of rows for a page. Also, the page break events weren't called until this row limit was met, so you'd end up with a random page break on page 3, say, of your report when you finally reach the page break interval value.<br />
<br />
This example report shows a way to get around this. It finds the length of your multi-line field and approximates a lineCount based on how many characters fit on a row in your design. It then keeps track of these lines and inserts a page break prior to the current row when you exceed the limit. This forces the page break events to be called allowing you to create an accurate TOC. I have included in the report the table and TOC with the page breaking done manually followed by the same table and TOC without the manual page breaking.<br />
<br />
This report was designed in BIRT 2.5.1, but the idea can be used in any version.
Warning No formatter is installed for the format ipb