Specifying the number of rows per page
Specifying page breaks before or after selected sections or groups in a report is the typical way to control pagination. Another way is to insert a page break after a specified number of data rows. For example, in a simple listing report that does not contain groups or multiple sections, you could display twenty rows on each page.
While the typical case for specifying the number of rows per page is for a simple listing report, you can also apply this pagination method to a report that groups data.
Figure 20‑11 shows two pages of a report that displays ten data rows per page in the report viewer. The report groups products sold by customer and by order number. Notice that only detail rows are counted. Group header and footer rows are not counted. As
Figure 20‑11 also shows, detail rows in a group can be split onto multiple pages, not a result you typically want.
Figure 20‑11 Report pages displaying ten data rows per page
To specify the number of data rows per page, select the table element that contains the data and set the table’s Page Break Interval property. The Page Break Interval property applies page breaks to all output formats, except HTML and XLS.
Figure 20‑12 shows the report design that generates the report shown in
Figure 20‑11. The selected table has its Page Break Interval property set to 10.
The default value for Page Break Interval is 40. For output formats that have a fixed page size, such as PDF and DOC, a page typically fits fewer than 40 data rows, so the default Page Break Interval value does not have any effect. Each page displays as many rows as will fit. Page Break Interval has a noticeable effect only if it is set to a number smaller than the number of rows that can fit on a fixed-size page. In that case, each page displays the specified number of rows followed by blank space.
When displaying the report in the report viewer, however, the Page Break Interval value is significant whether it is set to a low number or a high one. Unlike a report in PDF or DOC format, each page in the report viewer can display hundreds of data rows.
To display an entire report on one page in the report viewer, set Page Break Interval to 0. Note, however, that if the report is very long, a single page takes longer to generate than multiple shorter pages.
Figure 20‑12 Table displaying its Page Break Interval property set to 10