Define Headers and Footers

You can define headers and footers as part of the template.

This section covers the following topics:

Native Support for Headers and Footers

You can use native RTF header and footer in the report.

To create a header or footer, use the word processor's header and footer insertion tools. As an alternative, or if you have multiple headers and footers, you can use start:body and end body tags to distinguish the header and footer regions from the body of the report.

Insert Placeholders in the Headers and Footers

At the time of this writing, Microsoft Word doesn't support form fields in the header and footer.

You must therefore insert the placeholder syntax directly into the template (basic RTF method), or use the start body/end body syntax described in the next section.

Create Multiple or Complex Headers and Footers

You can create multiple or complex headers and footers in the template by using Publisher tags to define the body area of the report. You can include complex objects in the form fields for the header and footer. When you define the body area, the elements occurring before the beginning of the body area compose the header. The elements occurring after the body area compose the footer.

Use the following tags to enclose the body area of the report:

<?start:body?>

<?end body?>

Use the tags either directly in the template, or in form fields.

The Payables Invoice Register contains a simple header and footer and therefore doesn't require the start body/end body tags. However, if you wanted to add another header to the template, define the body area.

Perform the following steps to define the body area:

  1. Insert <?start:body?> before the Suppliers group tag:

    <?for-each:G_VENDOR_NAME?>

  2. Insert <?end body?> after the Suppliers group closing tag:

    <?end for-each?>

The following figure shows the Payables Invoice Register with the start body/end body tags inserted:

Define Different First Page, Odd Pages, and Even Pages

If the report requires a different header and footer on the first page of the report; or, if the report requires different headers and footers for odd and even pages, then you can define different page setup for first page, odd pages, and even pages using Microsoft Word's Page Setup dialog. This feature is supported for PDF and RTF output only.

  1. Select Page Setup from the File menu.
  2. In the Page Setup dialog, select the Layout tab.
  3. In the Headers and footers region of the dialog, select the appropriate check box:

    Different odd and even

    Different first page

  4. Insert the headers and footers into the template as desired.

At run time the generated report exhibits the defined header and footer behavior.