Solved

Dynamic SSRS ReportViewer datasource

Posted on 2011-09-27
4
1,134 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:vecbmcdonald
  • 2
4 Comments
 
LVL 4

Expert Comment

by:anandarajpandian
ID: 36714494
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
 
LVL 11

Accepted Solution

by:
SThaya earned 250 total points
ID: 36714747
0
 

Author Comment

by:vecbmcdonald
ID: 36716700
Thanks SThaya. That link provided me with a good idea of how to accomplish my task.
0
 

Author Closing Comment

by:vecbmcdonald
ID: 36716725
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question