Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 6  BUILDING REPORTS


Adding the Final Touches

In many projects, the final touches can be quite time-consuming. You now have the Employee Service
Cost report to the point where it is functioning the way you expect and has had formatting applied to
some extent during development. You have only a few final elements to apply before you call the report
complete and before it’s ready to deploy to your SSRS Web server for production:


  • Adding a page header and footer

  • Adding a report title

  • Adding page numbers

  • Adding the report execution time


To add a page header and footer to the report, select the Report menu and then Add Page Header
and Add Page Footer. This will add the two new sections to the report where you will add the values that
will print on every page.
In the Toolbox, you’ll see two report items, a textbox and a line, that you can use in the page header
and footer sections. First drag two textboxes to the header and one to the footer. Then align one of the
header textboxes to be the same width as the table, enter your report title as Employee Service Cost by
Diagnosis, change the font size to 16 points, and apply bold formatting. Next, drag a line into the header
section, and position it between the chart and the report title textbox you just created.
In the second textbox in the header section, add the following expression based on global
parameters as defined in the Edit Expression window:

="Page " & Globals!PageNumber & " of " & Globals!TotalPages

Finally, in the textbox in the footer, add the following expression for the report execution time:

=Globals!ExecutionTime

You are now ready to preview your report one last time before you deploy it to your users. This time,
let’s take a look at the final version in the browser (see Figure 6-42). This is what the report will look like
when it has been deployed to the Web server. (We will discuss methods for deploying reports in Chapter
8). After previewing the report, scroll down to the bottom of the report to see the report execution time
in the footer. The completed report with all the final touches can be seen in the Pro_SSRS project is
called EmployeeServiceCost_Final.rdl.
Free download pdf