Eclipse BIRT Report Object Model (ROM)

SimpleMasterPage Element

# Element Overview

The simple master page provides a header and footer that appear on every page.

### Details

Display Name: | Simple Master Page
Since: | 1.0
XML Element: | `simple-master-page`
Extends: | MasterPage
Extendable: | Yes
Abstract: | No
Name Space: | Pages
Name Requirement: | Required
Allows User Properties: | Yes
Has Style: | Yes
Default Style: | page

### Property Summary

floatingFooter
  If true, the footer "floats" after the last content on each page.
footerHeight
  Height of the page footer.
headerHeight
  Height of the page header.
showFooterOnLast
  Whether to show the page footer on the last page of the report.
showHeaderOnFirst
  Whether to show the page header on the first page of the report.

### Slot Summary

pageHeader
  Element to display at the top of each page.
pageFooter
  Element to display at the bottom of each page.

### Inherited Properties

bottomMargin, comments, customXml, displayName, displayNameID, eventHandlerClass, extends, height, leftMargin, name, orientation, propertyMasks, rightMargin, style, topMargin, type, userProperties, viewAction, width

### Style Properties

backgroundAttachment, backgroundColor, backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, borderBottomColor, borderBottomStyle, borderBottomWidth, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRightColor, borderRightStyle, borderRightWidth, borderTopColor, borderTopStyle, borderTopWidth, canShrink, color, dateFormat, dateTimeFormat, display, fontFamily, fontSize, fontStyle, fontVariant, fontWeight, highlightRules, letterSpacing, lineHeight, mapRules, marginBottom, marginLeft, marginRight, marginTop, masterPage, numberAlign, numberFormat, orphans, paddingBottom, paddingLeft, paddingRight, paddingTop, pageBreakAfter, pageBreakBefore, pageBreakInside, showIfBlank, stringFormat, textAlign, textIndent, textLineThrough, textOverline, textTransform, textUnderline, timeFormat, verticalAlign, whiteSpace, widows, wordSpacing

### Description

The page margins define the position of the content area on the page. The page header and footer reside within the content area. The page header is at the top on each page, and the page footer is at the bottom.

The following crude picture gives an idea of the parts of a simple master page:

#### Page Header and Footer

The page header and footer can include any element except the following:

- Any element is bound to a data set. The header and footer do not have visibility to any data set.
- A list, table, matrix or other item that is normally driven by a data set.

The header and footer can display data from global variables, from report parameters or other sources. Such expressions are evaluated once early in the report, and the same values will be used on all subsequent pages. The one exception is the page number, which is shown as expected on each page.

BIRT FO output format maps page header to `region-before`, and page footer to `region-after.`

#### Common Left/Center/Right Layout

A very common construction for a page header or footer is to include a three-cell grid in which the first cell is left-aligned, the second cell is centered and the third is right-aligned. For example:

    ABC Corp.              Sales Summary Report       Page 1 of 4

Or,

    Sales Summary Report         — 1 —         Run Date: 12/13/04

#### Style

Page header and page footer are elements, and each element defines its own style. So, to set the style of the page header or footer, set the style on the page header or footer element itself.

# Property Detail

## floatingFooter Property

If true, the footer "floats" after the last content on each page.

### Details

Type: | boolean
Since: | reserved
Required: | No
Display Name: | Floating footer
JavaScript Type: |
Default Value: | false
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Hidden
Property Sheet Group: | Top

### Description

If true, the footer "floats" after the last content on each page. If false, the footer is always at the bottom of the content area. Default is false.

## footerHeight Property

Height of the page footer.

### Details

Type: | dimension
Since: | 1.0
Required: | No
Display Name: | Footer height
JavaScript Type: |
Default Value: | 0.5in
Inherited: | Yes
Runtime Settable: | Yes
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

Height of the page footer.

## headerHeight Property

Height of the page header.

### Details

Type: | dimension
Since: | 1.0
Required: | No
Display Name: | Header height
JavaScript Type: |
Default Value: | 0.5in
Inherited: | Yes
Runtime Settable: | Yes
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

Height of the page header.

## showFooterOnLast Property

Whether to show the page footer on the last page of the report.

### Details

Type: | boolean
Since: | 1.0
Required: | No
Display Name: | Show footer on last page
JavaScript Type: |
Default Value: | true
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

Whether to show the page footer on the last page of the report. Default is true.

## showHeaderOnFirst Property

Whether to show the page header on the first page of the report.

### Details

Type: | boolean
Since: | 1.0
Required: | No
Display Name: | Show header on first page
JavaScript Type: |
Default Value: | true
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

Whether to show the page header on the first page of the report. Default is true.

# Slot Detail

## pageHeader Slot

Element to display at the top of each page.

### Details

Display Name: | Page Header
Since: |
XML Element: | `page-header`
Contents: | AutoText, Data, FreeForm, Grid, Image, Label, TemplateReportItem, Text, TextData
Default Style: | None

### Description

Contains an element to display at the top of each page. Contains any report item that is not variable size or is bound to data. The following elements are not allowed: Chart, List, Table, Matrix. The following are allowed: Data, Label, Text, Grid, Image.

### See Also

`showHeaderOnFirst` property

`headerHeight` property

## pageFooter Slot

Element to display at the bottom of each page.

### Details

Display Name: | Page Footer
Since: | 1.0
XML Element: | `page-footer`
Contents: | AutoText, Data, FreeForm, Grid, Image, Label, TemplateReportItem, Text, TextData
Default Style: | None

### Description

Contains an element to display at the bottom of each page. Contains any report item that is not variable size or is bound to data. The following elements are not allowed: Chart, List, Table, Matrix. The following are allowed: Data, Label, Text, Grid, Image.

### See Also

`showHeaderOnLast` property

`floatingFooter` property

`footerHeight` property