Introduction
We are going to learn how to include
header and footer sections in a report in Reporting Services 2008. We are
going to use Business Intelligence Development Studio (BIDS) and Adventure
Works sample database for this purpose.
We assume that you already have
skills on how to develop a simple tabular report using SSRS 2008.
Let’s say that we have a tabular
report, which shows a list of employees. This report shows Employee ID, First
Name, Last Name, Gender and Phone Number of every employee. Have a look at
below report image.
Before, we go ahead and do anything,
we need to discuss about the types of headers and footers in a report in
Reporting Services.
We have two types of headers as well
as footers:
- Report Header: Report header is a section, which only appears at the top of the first page of the report.
- Page Header: Page header is a section, which appears at the top of every page of the report.
- Report Footer: Report footer is a section, which only appears at the bottom of the last page of the report.
- Page Footer: Page footer is a section, which appears at the bottom of every page of the report.When we design a report, we only get Report Header and Report Footer sections on the report. However, it’s very difficult to find-out where these sections are on the report because no section is mentioned as Report Header or Report Footer anywhere. Neither, do we have any option to enable or disable it.The Page Header and Page Footer sections are optional for a report in Reporting Services. If you wish, you may include them into the report. We can clearly see these sections on the report. We do have option using which we can enable or disable them as well.So, let’s have a look at where these options are and how we can make use of them.Steps to include Page Header and Page FooterStep 1: Open your report into design mode or click on Design tab in the designer window. By default, whenever we open a report in BIDS, the Design tab is the active tab.Step 2: Right click on the area outside the report. You will get a menu as shown in below image.Step 3: Click on Add Page Header option from the drop down menu.Step 4: Click on Add Page Footer option from the drop down menu.Step 5: Now, we get page header and page footer sections as shown in below image.Wow! We got the page header and page footer sections now. Wait! But, there is no option to include a Report Header and Report Footer. That’s strange!Let’s have a look at how to include a report header and report footer.Steps to include Report Header and Report FooterIn fact, both the report header and report footer are very much there in the report. When we generate a new report, the report header and report footer are added by default. The space between bottom of the page header and top of the first data region control like a tablix is the Report Header section.Similarly, the space between top of the page footer and bottom of the last data region control is the Report Footer section. Have a look at below image.ConclusionReport Header and Report Footer are the sections, which are added to the report by default. While, Page Header and Page Footer sections are optional sections and we may include them by right clicking outside the report region and selecting Add Page Header and Add Page Footer options.
No comments:
Post a Comment