Reputation: 2397
I have a report that I created in SQL Server Reporting Services 2008.
I now want to create a new report, that is very similar that the one I already created.
How do I do that without writing the report from scratch? Can I just copy the .rdl to a new name? How will Visual Studio "pick that up"?
Thanks!
Upvotes: 14
Views: 48517
Reputation: 23789
[In recent versions of Visual Studio, you can simply copy and paste in the solution explorer window and rename the file there. This answer will work with older versions of VS.]
The easiest way I've found to do this:
Yes, there is no problem with adding multiple copies of identical .rdl's. There are no unique identifiers in the .rdl file.
Upvotes: 4
Reputation: 1
Upvotes: 0
Reputation: 11
I was able to create a new report in VS and instead of adding a new item (.rdl) in solution explorer I added an existing item, the .rdl from the report I wanted to copy. I changed the name of the .rdl and changed the SP in the dataset and it worked like a charm.
Upvotes: 1
Reputation: 331
Just one last comment on Amarundo's callout:
"Diego, that's the thing. I can right click the report (under Solution Explorer) and select copy, but can't find where to past. Or if I copy the .rdl
file, I don't know how to add that to my project."
If you right-click
on a report item in the Solutions Explorer, the Copy
option is available. However, the Paste
option never becomes visible, even when you have a report item in your clipboard. However, the object is there, and you can paste it by pressing ctrl+v.
I think it was just a UI miss on Microsoft's part.
Upvotes: 32
Reputation: 11
Yes. Right click your report ending with .rdl
, select copy, and then select your folder and paste with ctrl-V. You can see as Copy of yourReport
Upvotes: 0
Reputation: 11
I had been copying reports for a while. One of the copies started to have a problem with a sub-report not being able to show when the report was run. The sub-report ran fine by it's self. After looking at the XML code in the RDL, I found that next to the last line was a ReportID GUID. Most of my reports shared the same GUID, including this report and it's sub-report. After getting a fresh GUID for the sub-report the problem was cleared up.
The only process that I could find to generate a new GUID was to delete all Data Sources in the report. Then delete the ReportID line in the XML. Then re-add a Data Source, which caused the VS2010 to crash. Once VS2010 recovered I was able to re-add the Data Source, which replaced the ReportID line in the XML with a new GUID.
Upvotes: 1
Reputation: 11
Easiest way is copy the required .rdl
file from Reports Folder (which is in the Solution Explorer Window -> Project Dropdown List) and then right click your project name (which is on the top of the same window). Select the paste option and your project will be duplicated with the name of Copy of (copied .rdl file name)
.
Upvotes: 1
Reputation: 36136
I confess that I did not know the answer to this question, so I tried. I copied and renamed one of my reports, added it to my project, uploaded to SSRS and ran it.
Seems to be working fine, so I guess the answer is yes
Upvotes: 17