I need to dynamically specify the data source for SSRS reports at runtime. I found these solutions:
Change SSRS data source of report programmatically in server side
SSRS Dynamic Shared Data Source
Other technologies like Crystal Reports have allowed us to very easily change the data source at will for decades so it seems odd to me that these hacks are still the best way to accomplish this but assuming that is the case: is it possible to do this without enabling the unattended execution account?
Microsoft SQL Server. Microsoft SQL Server Analysis Services for MDX, DMX, Microsoft Power Pivot, and tabular models. Microsoft Azure SQL Database. Oracle.
Here is how I change a data source at runtime.
Create another "dsDynamic" data source and set its connection string expression to the following: ="Data Source="+Parameters!DatabaseServer.Value+";Initial Catalog=" + Parameters!DatabaseName.Value
Build and test the report by setting all datasets to the test connection created in step 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With