Managing products and portfolios : Setting up and generating reports workflow : Report templates : Report components : Header and footer tags
  
Header and footer tags
You can define headers and footers in a report template by using the fp:header and fp:footer tags. Header and footer tags have similar functions, and both tags use the height attribute:
For header tags, the height attribute determines where the report text begins:
fp:margin::top +fp:header::height
For footer tags, the height attribute determines where the report text ends:
fp:margin::bottom - fp:footer::height
Sets of headers and footers must match. For example, if the page value of fp:header is set to left, the page value of fp:footer must be set to left.
Header tags
If no fp:header tags are in a template, the header is not displayed in the report. A header is a table that contains a set of cells. The number of header tags must be a multiple of the number of columns. If cols specifies that there are three columns, the number of tags of the fp:header must be 3, 6, 9, 12, and so on. Every fp:header tag defines a cell in a header:
 
Tag
Description
fp:cell or fp:textcell
Contain simple text. These tags can create a cell that contains the text "Hello world":
<fp:textcell>Hello world</fp:textcell>
fp:imagecell
Contains an image. The image is read from a file, and the file must be in the .../Program Files/Focal Point/tool/images folder. Images can be in either GIF or JPG format; for example,
<fp:imagecell filename="myimage.jpg" />
If an fp:imagecell tag is in the first row or column of a header, it might not be displayed properly.
fp:complexcell
Contains a number of texts. The text can be a plain or a stringParam with type="template/runtime/never/fetch". This tag is the only fp:*cell tag that has its own tags. For more information about this tag, see the fp:complexcell tags table.
The fp:*cell tags have the following attributes:
 
Name
Description
Applicable tag
filename
A mandatory attribute that specifies the name of the file that contains the image.
fp:imagecell
align
An optional attribute that determines the horizontal alignment (left, right, or center).
The default value is left.
fp:textcell and fp:complexcell
border
An optional attribute that determines the border of the cell. The total border value is the sum of the values of each of the borders. The default value is 0.
For example, the borders of a cell have the following values:
Upper: 1
Lower: 2
Left: 4
Right: 8
To draw the upper, left, and right border, set the border value to:
1+4+8=13:border="13"
All fp*cell tags
colspan
An optional attribute that determines the number of table columns that a cell occupies. When the colspan attribute is used, the information about the number of cells required is incorrect. For example, a colspan="2" is counted as two cells.
The default value is 1.
All fp*cell tags
headingstyle
An optional attribute that determines the heading styles to use in the cell.
The default value is Normal.
All fp*cell tags
scalepercent
An optional attribute that determines the scaling of the image. To create the best quality image, create the image approximately five times larger than the intended size. Then scale down the image to the intended size. Images often are better quality on paper than on screen. For a standard screen size, scalepercent="100".
The default value is 100.
fp:imagecell
The fp:complexcell tag has the following tags.
 
Name
Description
fp:newline
Inserts a line break
fp:stringParam
fp:intParam
fp:checkboxParam
Inserts the plain text that is the result of evaluating the fp:*Param tag
fp:text
Inserts plain text
Header attributes
Header tags have two mandatory and two optional attributes.
 
Attribute
Description
cols
A mandatory attribute that determines the number and size of columns. For example, to create a table with three columns in which the third column is larger than the other columns, enter:
cols="30,30,40"
height
A mandatory attribute that determines the height of the header. This attribute affects PDF reports only. For example, to specify a height of 3 cm, enter:
height="100"
page
An optional attribute that determines the pages for which the header is used. This attribute has the following possible values:
all: The header is used on all the pages (the default value)
first: The header is used on the first page only
left: The header is used on all the left pages
right: The header is used on all the right pages
The following rules apply to setting the page attribute:
For the first page, use page="first". Otherwise, use page="right" or page="all". If none of those pages exist, do not use a header.
For left pages, use page="left". Otherwise, use page="all". If none of those pages exist, do not use a header.
For right pages, except for the first page, use page="right". Otherwise, use page="all". If none of those pages exist, do not use a header.
The default value is all.
percentwidth
An optional attribute that affects the width of the table header. The default value is 100.
This header was generated in a PDF document by using the sample fp:header tag.
Example header
<fp:header cols="16,47,63,23,24" height="70" percentwidth="123">
  <fp:cell border="0" headingstyle="NormalMiddle"></fp:cell>
  <fp:cell border="0" headingstyle="NormalMiddle"></fp:cell>
  <fp:cell border="2" headingstyle="NormalMiddle"></fp:cell>
  <fp:cell border="2" headingstyle="NormalMiddle"></fp:cell>
  <fp:cell border="2" headingstyle="NormalMiddle"></fp:cell>
  <fp:cell border="0" headingstyle="NormalMini"></fp:cell>
  <fp:imagecell align="center" colspan="1" border="8"
      filename="logo.jpg" scalepercent="12"
      style="NormalMini" />
  <fp:complexcell border="15">
    <fp:text style="NormalMiniLeft"> Uppgjord -</fp:text>
    <fp:textstyle="NormalMiniLeftItalic">Prepared</fp:text>
    <fp:newline style="Normal" /><fp:text style="Normal">
      </fp:text>
    <fp:stringparam name="Uppgjord" descr="Uppgjord"
      changeable="runtime" id="1" defaultvalue="" />
  </fp:complexcell> <fp:complexcell border="15">
    <fp:text style="NormalMini"> Datum -</fp:text>
      <fp:textstyle="NormalMiniItalic">Date</fp:text>
      <fp:newline style="Normal" /><fp:text style="Normal">
      </fp:text>
     <fp:stringparam name="currentdate" descr="Datum"
       changeable="fetch" id="2" defaultvalue=""/>
  </fp:complexcell>
  <fp:complexcell border="15">
    <fp:text style="NormalMini"> Sida -</fp:text>
    <fp:textstyle="NormalMiniItalic">Page</fp:text>
    <fp:newline style="Normal" />
       <fp:text style="Normal"></fp:text>
    <fp:intParam name="pageno" descr="Sidnummer"
         changeable="fetch" defaultvalue="" id="3"/>
    <fp:text>(</fp:text>
    <fp:intParam name="numpages" descr="Antal
         sidor"changeable="fetch" defaultvalue="" id="4"/>
    <fp:text>)</fp:text>
  </fp:complexcell>
  <fp:cell border="0" headingstyle="NormalMini"></fp:cell>
  <fp:complexcell border="8"
         headingstyle="NormalMiddle"align="left">
    <fp:text style="NormalMiddle">Stockholm</fp:text>
    <fp:newline />
    <fp:text style="NormalMiddle">Sweden</fp:text>
  </fp:complexcell>
  <fp:complexcell border="15">
    <fp:text style="NormalMiniLeft"> Godkänd -</fp:text>
    <fp:textstyle="NormalMiniLeftItalic">Approved</fp:text>
    <fp:newline style="Normal" />
    <fp:text style="Normal"> </fp:text>
    <fp:stringparam name="Godkänd"descr="Godkänd av"
        changeable="runtime" id="5" defaultvalue=""/>
  </fp:complexcell>
  <fp:complexcell border="15">
    <fp:text style="NormalMini"> Dok nr -</fp:text>
    <fp:text style="NormalMiniItalic">DocNo</fp:text>
    <fp:newline style="Normal" />
    <fp:text style="Normal"> </fp:text>
    <fp:stringparam name="Dok Nr" descr="Dokumentnummer"
        changeable="runtime" id="6" defaultvalue="" />
  </fp:complexcell>
  <fp:complexcell border="15">
    <fp:text style="NormalMini"> Revision -</fp:text>
    <fp:textstyle="NormalMiniItalic">Revision</fp:text>
    <fp:newline style="Normal" />
    <fp:text style="Normal"> </fp:text>
    <fp:stringparam name="Revision" descr="Revision"
        changeable="runtime" id="7" defaultvalue=""/>
  </fp:complexcell>
  <fp:cell border="0" headingstyle="Normal"></fp:cell>
  <fp:cell border="0" headingstyle="Normal"></fp:cell>
  <fp:cell border="1" headingstyle="Normal"></fp:cell>
  <fp:cell border="1" headingstyle="Normal"></fp:cell>
  <fp:cell border="1" headingstyle="Normal"></fp:cell>
</fp:header>
Go up to
Report components