To add a page header or footer to a report, create a simple container and set the
Section property.
About this task
Placement of the header and footer containers take the page size
into account. When a report page is printed, any page header prints at the top of
the page, followed by the content of the containers associated with trigger nodes,
followed by any page footer at the bottom of page, in accordance with the Page Size set
for the report. This is the basic design of the report page, which is repeated when
the report is run for as many pages as are required, based on the data passed to the
Report Writer.
Open or create a report.
Add the header or footer container to a Mini Page or Page Root of the report.
Set the container's Section (also called port)
property to one of the header or footer values.
For example, a Vertical Box with the Section property set to the
firstPageHeader section will print as the header on the first page of the report. For a full list of
the options, see Section.
In the parent Container, you cannot have multiple header or footer containers set to the same
section.
If you use a Vertical Box for the header or footer container, set the Layout Node's X-size property to
max, and its Y-Size property to
min.
Ensure that the header and footer nodes are correctly placed in the Report Structure.
Important: If the Section property is specified, the header or
footer must be the elder sibling of any node without the
Section property specified. The exception is the
Last Page Footer, which must come after the other nodes. See Figure 1.
Figure: Headers and Footers in Structure View
Build up the header or footer using various containers and report elements.
For example:
Stripes are useful for report elements that are to be laid out left to right across the
page.
Word
Boxes and Image Boxes display content
within the container in the order in which it should be printed.
Page Number Boxes provide runtime
information about the pages of the report.
At most, one header and one footer displays in the Design view
at any one time. You can choose which header or footer to display using the
combobox, as in Figure 2.Figure: Select header to display