Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Dynamic SSRS ReportViewer datasource

Posted on 2011-09-27
4
Medium Priority
?
1,201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 750 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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

How to use Variables  and Custom code in SSRS report and Assembly reference to use compile shared code in SSRS. Its big question for all who are working with SSRS. It is easy to create assembly and refer in SSRS report, still there are some steps…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

650 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