Friday, February 24, 2012

Dynamic connection string problem in SSRS2005

Hi, I'm a newbie to SSRS, and was wondering if anybody can shed light on a problem I have. I have a report which every client uses, but each client's data is held in its own database. Rather than create many reports, is it possible to create 1 report, which all can use, passing in the different datasource? I was thinking of a hidden parameter, passed by URL. Or maybe using the report viewer control in VS2005. Can anybody please help?

Thanks

Dan

Yes, private data sources can have expression-based connection strings. Please check the following threads:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1008518&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1306007&SiteID=1

|||

Thats great, thanks. I have used a report viewer, pointing to a report on a server, with a dynamic connection string.

One more question though, I am connecting to a secure server, and need to provide a login, eg sql_user, pword. Where / how do I provide this in the code / url?

Thanks

Dan

|||How would you collect the credentials? If the user enters them before running the report you have no other way but passing them as parameters to the report (something you should avoid). If they are known values, you can save them in the Report Server web.config file as the ExpressionBasedConnection report demonstrates.|||

Oh, ok I'll try that tomorrow.

Thanks Teo.

No comments:

Post a Comment