Pages and page sections
There are three different page types in the tool, first, repeat and last. Each page consists of three sections, header footer and flow. There is no need to use all page types nor page sections if not necessary to achieve the desired layout. The page types makes it possible to design specific layouts for the first page and last page of the report. All other pages will get the "repeat" layout. In the header and footer section of a page is where you put static content. The layout of a header and footer is fixed, theses sections will not expand as the flow section. Headers and footers are optional for a page and the height of each section can be customized as required. This section discuses how different page sections can be configured for different page types.
Setting Page Headers
The Page Header(s) section of the dialog allows you to set custom headers to the first and rest pages. The header size for the rest page is defined on the Size field but if no header exists, this can be specified as 0.0. If the header on the first page is different from that of the repeat page, this is shown by selecting the Different header in first page option and setting the specific header size.
Setting Page Footers
Configuring page footers is identical to the process of defining page headers. The footer size for the rest page is specified on the Size field on the Page Footers(s) section. By selecting or deselecting the Different footer in first page option one can create a new footer for the first page or reuse the same footer of the rest page in the first.
Following are few examples of different header footer combinations that can be created using first and rest pages. The resulting page settings for each combination is displayed on the right.
|Header Footer Combinations||Resulting page settings
If you look closely you will see that when the rest page header and footer both are reused for the first page the result would be a single repeat page. No first page will be created. The reason for this is that if both headers and footers of the two pages are same and the flow section is anyway the same, then both pages become identical. Therefore, only the rest page will be created. See the first combination above. Use this setting to create a custom layout with only a rest page and no first page. The same output can also be achieved using the last combination shown above.
Initial Page number
By default the the value of the Initial page number is set to "1" when loading the template. Then the Report Designer framework will consider this value as the initial start page value when numbering pages. But the value can be changes as required from the “Edit Layout” dialog. When changing the number you must enter either an integer value or a full X-path string which returns an integer value. For an example the full X-path for the initial page number text field can be given as follows which returns an integer value:
If you failed to provide a valid full X-path string in the text box, when rendering the report it will ignore the given X-path and will return value "1" as the initial page number.
Configure Last Page
Last page configurations are made from Different Last page section of the dialog.
By default this page is set to None. If you wish to add a last page comprising of only static data then select Static page checkbox. Otherwise, to have a last page with both static and repeating data select Different header/footer option. This will create a last page with a flow section and a header, footer same as the rest page.
Set No Flow on First Page
When No flow on first page option is selected the first page will comprise of only static content (header and footer) and no flow will be included.
The header and footer sizes of the first page will be readjusted so that their height (header + footer) would add up to the page height. Resulting in only static content on the first page and having no flow section.
Restarting Page Numbering
The Restarting page numbering option will reset the page numbers each time the report reaches the end of a logical grouping. This way the page numbering will not increase from 1 to n in a continuous manner. Instead the numbering will reset to 1 each time the data in the top level table iterates to the next round.
Say a report consists of a number of orders. Each order consists of a number of pages. If the first order consists of 4 pages, the next of 3, and the third of 5 pages, the resulting page numbering would be 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 4, 5.
Creating a Static Form
"Static Form" is available under the Layout Options in the New Layout dialog and users are able to create a form when creating a new layout. Once you select the option the the user will be able to select the Background Image for the static form from the dialog itself as shown below.
Since this option creates a static page, none of the properties discussed above are relevant for this. The report is treated as a big header area. In addition, the user can specify a layout background. This can typically be an image or a PDF. Other configuration properties will be disabled and not allowed to set or modify by the users.
When opening a PDF or an image there will be few automatic changes to some of the properties, the properties such as page height and the width of the report will be adjusted accordingly; and the page Orientation will be set accordingly. Static form will support maximum up to three pages and it well come as page 1, page 2 and page3.
1 page: When you select an image or an PDF file with one page as the layout background, you will get the same first page and there will be no last page. The header size as large as the full page. No footer and no flow area.
2 pages: When you select a PDF file with two pages as the layout background, there will be a additional static last page and other properties are the same as for 1 page above.
3 pages: When you select a PDF file three pages or more as the layout background, you will get different first page with no flow and same header size as large as the full page, no footer. Other properties are the same as for 2 pages above.
If you select a PDF file with more than three pages as the layout background, it will consider only first three pages of the PDF file and will form a static form with page 1, 2 and 3. By using these properties, you can trick the tool into working with multiple static pages.
Following is an example of how a static form with one page will look like in Report Designer layout design area.