A quick article on if you are trying to create a new subscription to a SQL Server Reporting Server (SSRS) report and you are getting a warning message similar to the following:
Message from webpage Subscriptions cannot be created because the credentials used to run the report are not stored, or if a linked report, the link is no longer valid.
- Message from webpage
- Subscriptions cannot be created because the credentials used to run the report are not stored, or if a linked report, the link is no longer valid.
Why?
The problem happens because of the data source used in the report. For static data source connections, this is straightforward but in our case, we have a report which points to different servers based on a report parameter.
How?
There are various types of data sources used in SSRS so I'm going to try and cover the ones I have used previously and what we needed to get them working.
-
Custom DataSource
- Upload the report to the ReportServer.
- Hover the mouse cursor over it and click on the dropdown arrow to its right
- Select "Manage" in the dropdown menu
- Select "Data Sources" in the left menu
- Specify a "custom data source" and test the connection.
- Ensure unattended system account scheduled to run and email the report can access the datasource (ask a DBA if you're unsure).
-
Shared DataSource
- Upload the report to the ReportServer.
- Hover the mouse cursor over it and click on the dropdown arrow to its right
- Select "Manage" in the dropdown menu
- Select "Data Sources" in the left menu
- Specify a "shared data source" and browse to it to ensure it exists.
- Ensure unattended system account scheduled to run and email the report can access the datasource (ask a DBA if you're unsure).
-
Parameter-Driven DataSource
- In the folder where you put your Data Sources, click on the button "New Data Source"
- Specify the details, especially the connection string (which the system account can use).
- Set "Connect Using" to "Credentials supplied by the user running the report".
- Browse to your report or upload it if it does not exist.
- Hover the mouse cursor over it and click on the dropdown arrow to its right
- Select "Manage" in the dropdown menu
- Select "Data Sources" in the left menu
- Specify a "shared data source" and browse to the one you just created and click on "OK".
- Click on "Apply" (just to be sure).
- Ensure unattended system account scheduled to run and email the report can access the datasources for each parameter-driven connection (ask a DBA if you're unsure).