Standardizing and Centralizing Report Design (or: creating style sheets for reports) Part 2: The Layout-Template
As a first technique in this series we will look at what I will call “Layout template”.
I chose the Term “Layout-Template” for two reasons:
first: the main thing that they can be used for is, to define general report sizing, footer and header elements – in other words, the overall layout of the report.
secondly: in the next part of this series we will see a different type of template which will actually be called “Style-Template”.
So, what is a Layout-Template?:
A Report Template can be as simple as a standard report with a certain page width and height, certain colors, a standard company logo etc., which can be copied over and over again.
Here the Problem is, how to avoid to overwrite the defined Report Template unintentionally, and, how to make it easily available.. even (report-)project-independent.
And this is where “Layout-Templates” come at hand.
Report Layout-Templates are shown in the Project-Dialogue “Add“ – “New Item“ .
There you can choose a Template and it will create a copy local to your project – and not overwrite the Rdl at its original location.
And this is how we create a Report Layout-Template:
1) Simply create a regular report, configure size, header and footer and so on. You could create a data region, but it would make little sense – just as a sample maybe.
2) Then you put the .rdl-file in the following location:
for Reporting Services 2005
- %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
for Reporting Services 2008 x64
- %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
for 32-bit Reporting Services 2008
- C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
3) and when you right-click at the reports-node in your project, click “Add“ and then chose “New Item“, your Report Templates will appear in the “Add New Item” box:
That’s it. Very simple.
How about “centralizing”?
- You can “xcopy deploy” this folder regularly to all your Developers machines.
- But: once the reports are created, and you make a change to the originating template, existing reports will not be touched.
How about “standardizing”?
- If you “xcopy deploy” this folder regularly to all your Developers machines, all your reports should have the same Layout in terms of sizing, header&footer.
In short: What Layout-Templates can be used for:
- Having predefined report size, (i.e. landscaped and portrait version)
- Include report-header and footer with corporate design and navigational elements
- Can even include sample data-regions with appropriate fonts and colors
In the next Part of the series, you will see how to create and use a Style-Template.
Sarpedon Quality Lab