I had a case where the original Visual Studio solution was missing and we needed to make changes to some reports. The reports were still up on the Reporting server and by using ReportingServicesTools, I was able to download all of them at one time instead of clicking each one and downloading manually.
Here is a typical folder on a Reporting server. Unfortunately, I need to make a change to some of the reports but am missing the original code. I could click each one and download the .rdl file, but that takes too much time and I might miss one.
Let us use PowerShell! There is a module called ReportingServicesTools that automates this and dozens of other tasks related to SSRS. To read more about this module, follow this link: https://github.com/microsoft/ReportingServicesTools
First we need to install it. Open up PowerShell as an administrator.
Then type or copy in this command to install the ReportingServicesTools module.
Invoke-Expression (Invoke-WebRequest https://aka.ms/rstools)
This will download and install the module.
When it is done, you will get this message saying it was installed correctly.
Now we can use the command below to see that it shows up in our list of installed modules.
We can also run the get-command command and see what we can do with the ReportingServicesTools module. Below is just a partial list, you can scroll down pretty far.
Get-Command -module reportingservicestools
Now that it is installed, we can now run the command to download all of the report files. Below is my directory I want to download them to: c:\temp\test
Now just use this command, out-rsfoldercontent and provide the report server name, the folder you want to download and the destination where you want the files to go. Below is the command for my server. Just substitute your information for the report server, the folder and the destination. This command assumes you have permissions to the reporting server, if not you will need to pass in credentials.
out-rsfoldercontent -ReportServerUri 'http://etlsqldb/ReportServer' -rsfolder /amr_reports -destination c:\temp\test
After the command finishes all of the RDL files are saved to my computer. Now I can create a new Reporting Services solution and import these files and keep the source code safe since we are missing the original code.
Open Visual Studio and create a new Reporting Services project. The right click Reports on the right and pick ADD->Existing Item.
Point the open dialog location to the location we saved the files, c:\temp\test for our purposes.
That will load them all up in Visual Studio and now we can make our changes and deploy to the Reporting Server.
Now go keep your source code safe!
To read more about ReportingServicesTools, please follow this link: https://github.com/microsoft/ReportingServicesTools