Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 ssrs connection string update dymically to point t

Author  Topic 

abbi1680
Starting Member

3 Posts

Posted - 2010-05-11 : 11:23:19

Hi, I think you might be my help. I have a ssrs report deployed and wanted to change the database name dynamically.
It should not be interactive. For instance, I have 3 databases as below. They are monthly snapshops. Everytime I execute, the connection string should check the today's date and and execute the report against the correct snapshot.

To acheive this, I have written a .net console app that updates the below rdl tag and saves the same file. This way, we can dynamically change the connection string in rdl and persist it. Later, wehn we need to run through the report, it picks up the new db connection.

It has worked fine. But, I wonder if there is a way to get it done with a piece of t-sql code that updates the db connection string.

Data Source=SESH-BEJAWADA\MS2008;Initial Catalog=DBTest4

Databases.

DBtest0131 DBtest0228 DBtest0331

0131 is evaluated dynamically from getdate and updates the rdl file.


Please kindly msg me to abbi1680@gmail.com

Thanks Abbi
   

- Advertisement -