Haven’t I done this before?
As a Reporting Services Developer you may have found yourself completing the same tasks over and over for each new report that you create. To alleviate this somewhat, you may have just done a quick ‘Copy & Paste’ of an existing report, renamed it and then modified all the elements within it. The trouble with doing this is that there are always a number of properties/expressions that may have been used in the copied report that tend to be obscure (such as dynamic sorting on columns in a table) and you end up having to hunt down a number of errors and fix them one by one.
It is much better/easier/faster/less frustrating (& should probably be labelled under ‘Best Practices’) to create a number of SSRS templates of your own that you can use over and over again in each of your projects. It may be a simple template that includes a header & footer formatted to fit either landscape or portrait page layouts (optimally sized for printing), with text/backgrounds formatted to the way you want then. It may also be as complex as you like, adding in pre-formatted tables/matrices, charts, etc. I have found creating my own SSRS templates to be incredibly useful and highly recommend it. I have made two basic templates available here (right-click>save as…). It is a zip file containing two .RDL files, 1 Landscape template, 1 Portrait template. Unzip the file to the directory indicated in the steps below to have access to them through BIDS. Note – these are for SSRS 2005.
Here’s how to create your own templates:
1. Open or create a new project and create a new report item.
2. Design the report to your specification, as described above (& see Fig 1. below)
Fig 1. User Designed Template
3. Save the report
4. Navigate to the folder where the .rdl file (that has just been saved) is stored.
5. Cut/Copy the file to the following location (giving the file a useful template-friendly name):
C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesProjectItemsReportProject
This is the default location of the templates folder. If you have installed Reporting Services on a different drive/directory update these references to reflect the different Drive/Directory. Now, to access the report template from any project, go back to BIDS, right-click the ‘Reports’ folder (in the Solution Explorer) in your project and choose Add>New Item
Fig 2. Add New Item Menu
and you will see your new templates under the heading ‘Visual Studio installed Templates’.
Fig 3. Select the New User Designed Template
Centralized Style Sheets for your SSRS Reports
For those of you who would like to take the standardization of Report Design further, there is a great article over at SQL Server Central that describes how to set up Style Sheets for Reports. This means that if a change needs to be made to the design (formatting) of an entire suite of reports, then it can be done in one place and propagated across all of your reports. I highly recommend this article.
Have you found any other innovative ways of reducing the time it takes to produce reports?
Let’s hear from you.