Conditional Headers and Footers
Headers and Footers that appear in the Report only when certain predefined conditions are satisfied are known as Conditional Headers/Footers. By default, each Report has one header and footer (called Default) that will always appear on every page of the Report. Conditional Headers and Footers are added to appear when their defined condition is satisfied. If these conditions are not satisfied then the Default header or footer is displayed.
Adding Conditional Headers and Footers
Expand the Header or Footer section of the report, right-click on the “Default” tab and select the “Add Conditional Header” or “Add Conditional Footer” menu item. This will add a new tab in the Header/Footer area.
Conditional Header and Footer Properties
Conditional Headers and Footers have the following properties:
|Condition||A value indicating the condition in which to evaluate to determine if the Conditional Header or Footer should be displayed. (see conditions listed below)|
|Id||A value indicating the programmatic identifier of the conditional header or footer of the report.|
|InheritElements||A Boolean value indicating whether the default header or footer elements will also be included in the Conditional Header or Footer.|
Conditions include the following:
- FirstPage – Displays the Conditional Header/Footer on the first page of the Report.
- LastPage – Displays the Conditional Header/Footer on the last page of the Report.
- MiddlePage – Displays the Conditional Header/Footer on any middle page of the Report.
- Document.EvenPage – Displays the Conditional Header/Footer on any even page of the Document.
- Document.OddPage – Displays the Conditional Header/Footer on any odd page of the Document.
Multiple Conditions Satisfied
Only one Conditional Header and Footer will ever be applied to any page. The condition of a Conditional Header/Footer will be evaluated from left to right in the order in which they were added in Designer. In other words they will be evaluated from left to right in the order their tab is listed in Designer. Even if multiple conditions would have been satisfied, only the first Conditional Header and Footer whose condition is found to be true will be displayed.