Solved

Dynamic SSRS ReportViewer datasource

Posted on 2011-09-27
4
1,109 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

22 Experts available now in Live!

Get 1:1 Help Now