Solved

Dynamic SSRS ReportViewer datasource

Posted on 2011-09-27
4
1,104 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
Comment Utility
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
Comment Utility
0
 

Author Comment

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

Author Closing Comment

by:vecbmcdonald
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now