The Report Header is the top section of a report. It usually contains the report title, page number, execution date and time, and so on. This topic will walk through the steps for adding the report header to a report.
To begin select Blank Report from either the Getting Started dialog or the New Report or Dataset dialog. We discussed these dialogs in the Getting Started section; you can return there if you need the details. You now have a blank report design surface. Click Header on the Insert tab of the Report Builder ribbon and select Add Header from the popup menu:
The report design surface shows the blank report header at the top:
Let's create a report header that includes the following:
To setup the report header, expand the Built-in Fields node in the Report Data area of Report Builder:
Follow these steps to fill in the report header:
After you drag and drop an item onto the report design surface, click on the edges to "select" the item. Once an item is selected, its properties are displayed in the Properties window, allowing you to change the settings. You can also click with the left mouse button and move the item around to position it right where you want it.
Click Run on the Home tab to preview the report:
When previewing your report, the Run tab is displayed which provides options to zoom in and out, navigate between the pages of the report, refresh, print, export and so on. The export feature provides a number of options for saving the report in different formats:
Let's change the report header to use an expression for the Page N on N:
You can build the expression by typing it in; you can also click an item in the Category list, then double click an item in the Item list to add it to the expression. The Globals items are in the Built-in Fields category. The CStr() function is in the Common Functions / Conversion category; it converts its argument to a string. By default a number is right justified so this will eliminate the leading spaces. Click OK and click Run on the Home tab to preview the report: