A report page is a medium which contains the layout result for a single page of a report. At runtime, a page or multiple pages can be generated according to the page panel settings. For reports each page has its own page header and page footer, which are controlled by the page panel settings for them. In library components there is no page header and page footer.
A report page has the following features.
A page panel is a template to design a page. You can define information for it and meanwhile information for pages designed with this page panel will be defined accordingly. Here, information covers all factors of a page, including page size, margin, and orientation. In a page report tab, JReport Designer also supports multiple page panels. With multiple page panels, you have to define each page panel's page settings individually.
Page panels can be inserted into the report body of a page report tab. For banded reports which are restricted flow layout reports that can contain only one single horizontal banded object, one page panel can be added separately for the banded header, banded footer, and detail panel of a banded object whose parent is the report body.
When inserting a page panel, you can choose whether the new page will keep the original page settings or it will apply new settings.
To remove an added page panel from a page report tab, set the mouse pointer to the beginning of the page panel and then press the Backspace key.
Page header and footer are areas in the top and the bottom page margins, where you can add almost any JReport components. You can insert fields, such as page numbers and chapter headings, in page header and footer in a text document.
A page header and page footer will be generated at the same time when a page report tab or a web report is created or when a new page panel is added in a page report tab.
You can choose to show or hide them according to your own requirements by selecting or unselecting the Page Header or Page Footer command on the View tab.
Settings for a page are the same as with a page panel which is used as a template to design this page. All pages designed with the same page panel will apply the same page settings. So, you just need to set the settings for one page panel to apply them to all these pages.
To adjust the page settings, the following are two ways for you to choose:
The Export tab is for defining page properties for each export result (for details, see Exporting Report Results).
A new page will be generated when the space in a page has been fully occupied or when for a page report tab there exists a break control in this page, for example, a page break that is inserted in the page. Page breaks can be inserted into the report body level. To insert a page break in a page report tab, click Insert > Page Break.
For banded reports which are restricted flow layout reports that can contain only one single horizontal banded object, a page break can be added separately for the banded header, banded footer, and detail panel of a banded object when the following conditions have been met:
In JReport Designer, you can set the page mode of a page report tab or a web report to be either pagination mode or continuous mode (to switch between the two page modes, you can select or unselect Page Layout on the View tab).
In pagination mode, the page shape and size can be specified in the page panel settings. Once set, the contents of the page report tab or web report will be laid out according to these specifications. If the contents exceed the specified size, the page break control will start a new page with the same size.
In addition, the total page size is determined both by the contents' size and by the page breaking control, such as Fill Whole Page, On New Page, Page Break.
In continuous page mode, only the component breaking control will work. The whole page report tab or web report is laid out in a single page, and has no specific shape and size. If no component breaking control has been set, all of the components will be laid out in the same page, and the size of the page will depend on the size of the contents.
In continuous page mode, all of the properties set in pagination mode will be simply skipped, including the page breaks in page panel. In this way, if there is more than one page panel in a page report tab, all contents contained in different page panels will be laid out in the same page, and only the first page panel's page header and footer will be laid out.
Component breaking rule
JReport Designer provides you with an option for adding page breaks to a component in continuous page mode. This kind of page break is not based on space, but on logic. For example, you can set a group break to occur every 20 detail panels, no matter how big these 20 detail panels are.
The following components have logic break functionality: