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

Multiple Datasources in Report

1 Answer 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Virgil
Top achievements
Rank 2
Virgil asked on 07 Jan 2014, 05:04 PM
Hi,
I have a report dll file I am consuming in my project. One of the report is using multiple ObjectDataSources. All these datasources have been defined at the design time using the app.config connection string named like this "FormattedReports.Properties.Settings.MyConnectionString".

Now, when it comes to use the report in a web site it doesn't seem to point to the right database server. The website has a connection string named just "MyConnectionString", but the report ignores it. Not wanting to duplicate the connection string in my website by adding an identical value with a different name, what are my options?

I've also tried to dynamically pass the datasource all together at runtime, however the engine only allows me to pass one datasource not all 5 with this code:  
FormattedReports.MyReport rep = new FormattedReports.MyReport()
rep.DataSource = datasource;

Thank you
Virgil

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 Jan 2014, 01:41 PM
Hi Virgil,

You can change the connection string name in the app.config as desired and update the datasource component to target the new connection string. This way you will be able to use in both projects the short named connection strings.

Regards,
Peter
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Virgil
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or