Saturday, February 18, 2012

Display Conditionally in 1st Header or Footer


Display Conditionally in 1st Header or Footer

There are times when you want to display something only on the first page of a report - typically in the header or the footer. This is easy to accomplish, but not necessarily obvious.

The key is to create a layout calculated field, and place it in the page header or page footer. 

For example:

Open a report in Report Studio.

Click the Toolbox tab in the Insertable Objects pane.
 
Drag a Layout Calculation to the page header or page footer. 

In the Report Expression dialog box, Expression Definition: field, type the following definition:

IF ( PageNumber( )=1 ) THEN
( 'This text only displays on the first page' )
ELSE 
( ' ' )

and click the OK button.
Run the report.

No comments:

Post a Comment