Tuesday, November 5, 2019 at 17:22:55
Designing SSRS reports in Visual Studio is liberating in how easy it is to get them up and running, but every so often you come across a gotcha that you think should be straight forward. One of them is copying a “solution” (VS’s name for a set of project files) to a new location. You might want to do this because you want to back it up, duplicate it for another related project, or just to run some tests against a demo version. What’s missing in VS is a “Save As” for the whole solution (you can do it for individual reports). If you copy the folder containing all the files you can create a new version in a new location, however all of the hard coded file locations will be incorrect and it will then fail to load.
So what is the solution?! Well you could create a new solution, then add in copies of all the existing reports, but then you still have to set it all up again which is just a little self-defeating. Surprisingly, the simplest thing is to copy the solution folder, but keep it within the same directory as the original, just changing the name. You can then open the copied solution from within this folder and all the reports load correctly (as new copies). If you are deploying this to SSRS then you will need to change the name of the solution in the solution properties, but then you are good to go.