Creating a template report in SQL Reporting Services 2005


In SSRS 2000, there was a specific location on the filesystem where you could drop RDL documents so that they’d show up as possbile new report choices when a developer chose to create new report. The same holds true for SSRS 2005:


C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject


If you browse to this location, you’ll notice (among other things) a report.rdl document. This file represents the “Report” item you see in the SRRS Project Items dialog that you choose from when you create a new report. You can do two things with the folder above:



  • Backup, and then modify report.rdl: All new reports “spring” from the essentially blank/empty report.rdl document. If you open  report.rdl document up in Report Designer, you can dress it up, adding images, layout, etc. Then, when any user chooses to create a new report, they’ll get your fixed-up version.

 



  • Add a new rdl document to the folder: A less intrusive approach is to add a second rdl document to this folder: For example, you could create a pre-formatted report with a background image and layout only, name it “Adventureworks Template Report.rdl” and then drop it in the folder. Now, users will be able to pick a company-specific report template if they want to, or just use the “blank” report.rdl

 

Comments (34)

  1. Rim U-nis says:

    Hi, I’m trying to create a template for my reports, I added the XML file to the reports/EN file, but still, the visual studio can’t see it. what do i need to do other than adding the XML file to the folder?

  2. Rim U-nis says:

    I have also tried adding the RDL file, but it didn’t work either!!

  3. russch says:

    Works like a charm for me….I made a copy of "Report.RDL" (Copy of Report.RDL) in C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesProjectItemsReportProject…and when I chose to Add | New Item, "Copy of Report" showed up in the Visual Studio installed templates area of the Add New Item dialog…

    Was VS opened when you did this work? If so, it won’t pick up the change…close it, then try again

  4. Reem says:

    Thank you, it worked finally.

  5. Reem says:

    I have another question regarding Report parameters in SSRS 2005, I need to change the prompt of one of my parameters according to another parameter’s value that the user selects. is that possible without referencing a custom assembly?

    thank you in advance.

  6. russch says:

    I don’t think this is going to work very well for you…First off, yes…You’d have to make a call to the SetReportParamters method with the updated prompt value…This would have to be done in a custom assembly…your real problem really happens AFTER you do that, though…let’s say you go ahead and change the parameter prompt to "Hello" — Well, the report which was first rendered is still in the user’s session for Reporting Services…so I don’t think the "revised" prompt value would even show up afterwards — You’d continue to see the "old" value unless you did something to refresh the report and get a whole new copy.

    I’ve never tried to do this myself, so I could be wrong…What about about using a custom page / form to do the parmeter picking (now your parameter labels could be very dynamic), and then just render the report by doing URL Access or showing it in the Report Viewer control?

  7. BlackCatBone says:

    Hello Russel,

    I have attempted to create a report template in the directory you identified in your article.  I am using Visual Studio 2005 (as opposed to the Sql Server Business Intelligence Development Studio) to develop reports, so they carry the .rdlc file extension.  I have created a template named ReportTemplateLandscape.rdlc and copied it to the correct folder.  I also made a copy of the existing Report.rdl file I found in the folder.  (The copy is named Copy of Report.rdl.)  Visual Studio 2005 doesn’t display either of the new templates in the "My Templates" section of the "Add New Item" window.  Shutting down VS and reopening it doesn’t help either.

    Do you have any idea what is happening in my case?  How different is the Business Intelligence Design Studio from Visual Studio 2005?  I read that it is a subset of VS 2005 but I don’t believe that is correct.  

    Thank you!

    BCB

  8. russch says:

    Creating reports with the stripped down RDLC report builder does not utilize these templates. Sorry!

  9. prakash says:

    pls send immediately….

    thank u..

  10. prakash says:

    pls send immediately……

    thank u….

  11. EdT says:

    Thank you for the article.

    Worked exactly as described using Visual Studion 2005 (IDE bundled with SQL Server 2005). Did not even need to reopen VS – it picked up our new templates as soon as the .rdl files were copied into the folder. Now I need to figure out why our new template’s icon files are being ignored…

  12. Rob says:

    I have tried adding the RDL file,it works good,But i have a question if i need to add my own template what i have to do?I tried to copy my own RDL and paste in

    C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesProjectItemsReportProject

    But it is not helping.

    Could you please help me?

    Thanks in advance

    Rob

  13. russch says:

    Did you close VS after doing this? The IDE will not dynamically pick up new files added to this folder. You have to stop/restart VS/BIDS…then it should work.

  14. erobinson says:

    Yes I tried.It works fine.

    Then i created a new report ,I went to add to add new items ,choosed the new template what i created before.But when i went to Data Set I got a popup tells "Data source is not fount add a data sourse to the data set"

    Then I went to tools i added a data sourse ,eventhoug i am getting the same popup.

    Could you please help me to figureout whats wrong.

    Thanks

    Rob

  15. russch says:

    Do you get the same behavior with a very basic "template" (maybe just a custom header with some textboxes on it? Does every template act this way?

  16. KC says:

    I understand the concept of using templates to create a new report, but my problem is this:

    I want to maintain a consistent header in all my reports, but if I need to tweak the header, I want to do it in one place, and have the change be automatically assimilated by all the reports.

    In MS Access you can accomplish this by putting a header subreport in the page header of all your main reports.  However, my research indicates that you cannot put subreports in headers and footers in Reporting Services reports.

  17. HW says:

    The Template works fine for me. My question is: if I created some reports based on this template, and later Client request to add something to update this template, can I just update template without re-create reports?

  18. russch says:

    HW, you are looking at a Linked Report, then.

  19. Howard says:

    Hi Russel !!

    Can we use customized report templates in Report Builder.

    I am working on Model projects where we create reports in Report builder using Report models.

    Thanks,

    HR

  20. russch says:

    Nope. Very sorry, but you can’t.

  21. Raj says:

    Hi

    how do i create interactive customized report in SSRS,with drill down options in the report

  22. kaarthika says:

    Hi

     I have a reporting requirement with "Regions" (FL, GA, MD etc..)as a Multi Select parameter and need to select some counts from Oracle BD. Then based on the "Regions" Selected I need to display multiple Charts (One for each region selected) with the counts in the Column chart. Is it possible. Please let me know ASAP.

    Thanks

    Kaarthika

  23. Terry says:

    Good pointer Russell and it works well, though it would have been nice if we could default stuff like fonts, background colours, padding, etc.  As it is I worked around this by creating a skeleton of a standard report of mine and then saving this in the templates location.  Now when I create a report on that template I don’t have to mess around formatting dates, setting colours, fonts, etc for every single item.

    Maybe in the next release microsoft will incorporate setting defaults for styles and so forth – then we’ll be cookin’

    Regards

  24. russch says:

    I agree 100% – and unfortunately in 2008 there won’t be too many improvements in this area. But wait till you see all the cool new charts, Tablix and other stuff!

  25. Alex says:

    taking again this issue, after having a working template and then we need to modify the template .

    can I just update template without re-create reports?  (It is not a different report -liked report-, because the original one must be changed from now on).

    Thanks!

  26. Rana says:

    Hi, i need to create many templates for a specific report, and the used choose the template he wants to browse the data in, how can i make this works? i meen attaching many templates to a report. thanks for ur quick prompt.

  27. russch says:

    I’m not 100% sure I understand your question, but it sounds like you want to apply styles (maybe via CSS) to a report dynamically. Unfortunately, we don’t support this.

  28. manish says:

    i have created dynamic RDLC file it’s work perfectly but now i want apply stylesheet (CSS) on that file so, please help me… it’s urgent..

    Thanks in advance

  29. Laura says:

    We have VS installed on it’s own server and I can find the location and saved the file there.  When I open VS from the server, the report template is there.  But if I open VS from my client, it’s not.  How do I save the template so that it will be accessible for anyone who opens Visual Studio?

  30. Ryan Mc says:

    Can I move a .rdl file to a directory and have this work for me in SQL Reporting Services 2000?

    First of all the path C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies exists but not the ProjectItemsReportProject portion.

    I created a template and attempted to move it to many of these directories (including creating those that were "missing") and have not achieved success.

    Again, is this because I am not operating the 2005 version?

    Thanks,

    RMc

  31. siri says:

    hi,

    i created a template in sql server business intelligence studio and when i try to add new i can see the template. now i wish to work on that template using report builder. but when i try to open in report builder only i can see the model. how do i get to work with this template in report builder.please help. i tried googling and stuff but nothing promising.

    thanks

  32. TammyL says:

    Hi,

    I need to know if the Report Builder 2.0 will support a custom template. Any thoughts on that…anyone?

  33. Rob says:

    My team don’t have access to their C drives how do you create a shared template that the whole team can use from a shared folder location? I don't want to update the template 30 times in 30 different places and to have to call I.T to do it as we can’t access our C drives?