Jon Hermiz Blog

The guide to programming and analyzing SQL, .NET, and SAP

How To Create Templates in Reporting Services 2005

Scenerio

Have you ever had the urge to create many similiar reports in Reporting Services without having to do all the busy touch up work thats involved?  You know what I mean; the constant header information with your company's logo, the footer with a datetime stamp, or the table that you always have to drag and drop into the report.  What about having the ability for a "new report item" to automatically come out adjusted as a landscape type report (11 x 8.5in) without always having to redefine it.

What You've Been Doing All Along

Every morning you come into work, you open your report project and you begin creating a new report.  And in each one of those reports you have to enable the header and footer, place the logos and times stamps, and set the width of the report to be a landscaped version.  You've done this once for every report and it takes you a good 10 minutes.  You've created well over 50 reports, thats 500 minutes, that's more than 8 hours of work!

What You Can Do

Believe it or not you can create a template report and re-use it across your report projects.  A template you say, what's that?  Well think of a template as a starting point on a task, the bare bones is done for you so you can concentrate on the important aspects of the report.  Think of it like CSS formatting on a web page so you can pay more attention to the actual contents of the page rather than what the web page looks like.

Creating A Report Template In VS

  • Add a new report to your project
  • Using the report designer place any objects (text boxes, tables, lines, etc) on the report that you want as a template.
  • Give the report a name (anything that you can remember in the future, for instance if you want landscape reports and you create a landscape template you should then call the report LandscapeTemplate.rdl)
  • Save this .rdl file to: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\

The next time you add a report item you will notice this item in the Templates section:

That's all there is to it.

So simply design the header / footer of your report.  Set the page size you would like and save this .rdl file.  Place the rdl file in the path mentioned above in green.  The next time you want to create one of your standard 50 reports use the template to get the bare bones of your report complete. 

Thanks to Andrew Polter for pointing this tip out!

Legacy Comments


hussein hoteit
2008-08-04
re: How To Create Templates in Reporting Services 2008
How To Create Templates in Reporting Services 2008?////

this path C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\
is not found in visual studio 2008?

TOM
2008-11-10
re: How To Create Templates in Reporting Services 2005
Thanks for your tutorial but how can I get the Landscape Template?

richa sood
2008-11-10
re: How To Create Templates in Reporting Services 2005
1. In the VS IDE where Business Intelligence PRoject has been opened and reports are being added. While working on a particular report. Go to Report - > Properties -> Layout

2. Change Width and Height of Report interchangeably to change report layout from Lanscape to potratie and vice versa.

3. In SQL 2000 the format were visible as Radio selection icons however in 2005 these properties (height and width ) for the report have to be modified to set the landscape format. After Applying the format on one report it can be saved as a template and used thereafter.

Emmanuel
2009-03-04
re: How To Create Templates in Reporting Services 2008
For SSRS 2008 use the Microsoft Visual Studio 9 directory:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

whenindowt
2009-03-05
re: How To Create Templates in Reporting Services 2005
Slick! The report template works great! Just as you've documented. Thanks you!

On a somewhat related continuation of this topic.

Can I do something similar to create a datasource template in a different directory? This would allow my Reporting Services newbies to point and click a report template and a datasource template and voila!, instant report.


Arunkumar S P
2009-10-13
re: How To Create Templates in Reporting Services 2005
Nice article. Thanks a lot

Prema Tiwari
2010-03-19
re: How To Create Templates in Reporting Services 2005
Very Nice article and useful information shared.

Thank you so much

-Prema

michlimes
2010-04-07
re: How To Create Templates in Reporting Services 2005
Yeah, but what if our template changes? We must change every report based on this "template", because it is only one-time copied to report

Jon H
2010-04-07
re: How To Create Templates in Reporting Services 2005
michlimes - That is why you want to make sure your template is a good basis for all your reports.
The template does not serve to sync all reports that use it, it is simply a basis to any report that is created.
The same is true with Object Oriented Programming. You want to ensure your base class has little to no changes
once you release it for clients to extend.

Leon F
2010-04-07
re: How To Create Templates in Reporting Services 2005
Thanks for the info, this is very helpful. I find that the report wizard does a lot of the work for me in many reports, but the wizard does not appear to use the template. Do you know if there is a way to make the wizard use the template so I can have the best of both?
Thanks,
Leon

ramesh nagineni
2010-10-31
re: How To Create Templates in Reporting Services 2005
this is the one of practical interview Question...!

Brandon
2010-11-01
re: How To Create Templates in Reporting Services 2005
Well, like someone else said, it's nice until you want to change it.
And no, it isn't like OOP and the base class because you can change the base class and all derived classes are up-to-date.

Is there a real templating system yet?

Thanks!

Brandon

name
2011-02-14
re: How To Create Templates in Reporting Services 2005
You misspelled the word "Scenerao"

name
2011-02-14
re: How To Create Templates in Reporting Services 2005
Oops, Scenario

Tc
2011-08-10
re: How To Create Templates in Reporting Services 2005
How To Create Templates in Reporting Services 2008?////

hey i saved the rdl file in the following path C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\
but still template is created

Tc
2011-08-10
re: How To Create Templates in Reporting Services 2005
How To Create Templates in Reporting Services 2008?////

hey i saved the rdl file in the following path C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\
but still template is NOT created

AjayMalloc
2011-11-21
re: How To Create Templates in Reporting Services 2005
Even for me that did not work. However when I placed that into below it worked. It was just a matter of finding the right installatioin path. I find this blog of great help.
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

organizadores bodas
2012-03-06
re: How To Create Templates in Reporting Services 2005
Great article!! Thanks for information

G
2012-07-27
re: How To Create Templates in Reporting Services 2005
I'm also wondering if there is a way to make changes in a lot of similar reports at once. I'm working with 10+ similar reports and it's quite frustrating to go through them all just to make a slight change.

Any info on this is greatly appreciated!

usman
2012-08-06
re: How To Create Templates in Reporting Services 2005
We must change every report based on this "template",i need help

Steve
2012-08-21
re: How To Create Templates in Reporting Services 2005
Added rdl file to the path specified:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\

Still does not show up under templates when creating a new BI/Report Server Project.

VS 2005 version 8.0.50727.762 (SP.050727-7600).

Is there something else that has to be done to have the .rdl file appear as a usable template?

Steve
2012-08-21
re: How To Create Templates in Reporting Services 2005
Whoops, never mind. I misunderstood where the actual file would show up.

It appears when you select add new item to your report project, not as a template when you are creating the project itself.

Was thinking it was somehow a project template, not a report template......duh.