This is a migrated thread and some comments may be shown as answers.

Dynamic ConnectionString

2 Answers 205 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gabriele
Top achievements
Rank 1
Gabriele asked on 22 Apr 2012, 05:22 PM
Hi,

this is my situation: I've a report library referenced in a Web Application; a Silverlight application can display reports using a WCF hosted on that web application, like is explained in this page. If I use a static connection strings (in the web.config file) all works fine. 

But I need to change the connection string based on user who request reports. For example User A have to access to database A_DB, user B have to access to database B_DB and so on.
I tried to pass user through a parameter so I can get the correct connection string and pass it to the datasources. But on report's constructor I don't have parameters data (I think this object will be populated with values passed from the client later in the report rendering's pipeline).

I think that I can pass the connection string on report's contructor, but this way will work on WinForm where I can create an instance of a report, but via WCF it is possible? Can I make a custome implementation of the Telerik.Reporting.Service.IResourceService interface?

What is the best way to achieve this?

Thanks

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Apr 2012, 08:23 AM
Hi Gabriele,

Check the following forum post that elaborates on how to accomplish your requirement.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Gabriele
Top achievements
Rank 1
answered on 23 Apr 2012, 02:48 PM
Hi Steve,

I solved the problem with your indication.
Thanks for your support.


Tags
General Discussions
Asked by
Gabriele
Top achievements
Rank 1
Answers by
Steve
Telerik team
Gabriele
Top achievements
Rank 1
Share this question
or