Dynamic SSRS ReportViewer datasource

Hello,

I need some help figuring out how to dynamically set a SSRS report data source connection when generating reports on my ASP.Net page. We have a lot of (100+) clients that will all use the same set of reports, except that each client has its own server/database. Therefore I need to be able to specify that specific server and database based off the ClientID.

Can I pass along the datasource connection parameters when requesting reports from SSRS? I would think I should be able to set the connection string much like you would for any SQL connection something similar to:
 
"server=" + myServer + ";database=" + mydbName + ";user id=" + myUsername + ";password=" + myPassword + ";Encrypt=YES;TrustServerCertificate=true";

Open in new window


I have not had any success with this so far. I may have the wrong syntax for the connection string.  Is this possible? Please advise.

Thanks.
vecbmcdonaldAsked:
Who is Participating?
 
anandarajpandianCommented:
Create parameter for Server name and db name and uid &password while running report you have to give those parameter and datasource connection you pass all the parameter.


Regards
anand
0
 
vecbmcdonaldAuthor Commented:
Thanks SThaya. That link provided me with a good idea of how to accomplish my task.
0
 
vecbmcdonaldAuthor Commented:
Linked provided some good suggestions. The method described in the link is good if you want to manage connection strings that you stored in a database. That's not how I will be managing all my connections, but the "Parameters" portion and below gives me something to go on because these can be passed in at runtime.
0
All Courses

From novice to tech pro — start learning today.