During a recent SQL Server Reporting Services 2008 report design project, the client wanted different headers and footers, based on different information on the page, of various lengths of data.
Because the report items, i.e. tablix and textboxes would contain varying number of records which could result in data being on one or more pages of the report, one could not simply use the Page Number function of SSRS 2008, to control the page header and footer text.
Solution
SQL Server Reporting Services 2008 has a feature called PageName, which allows report designers to name different report items, which can then be used to control the page breaks of the report.
To use the PageName function to control the Page Header/Footer text:
- Select the required Report Item on the canvas
- In the Properties Tab, enter the required PageName
- Add an Textbox Item to the Page Header section
- Enter a conditional expression, using the IIF function and the PageName function
If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us
|