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

Datasource variable

3 Answers 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 14 Jan 2013, 07:59 AM
Hi,

we have the following request:

c# WPF-Project, n-qlite Databases (1 to n Datasources) and 10 Fix Reports. One sqlite-Database is one company of a Group.
The Application could handle n-companies, so we neeed 1 to n Databases.

Now we have a wpf.application with a report-viewer which shows us 10 Fix-designed reports. But i have to change the Datasource
from company to company, is this possible?

And how does we do this?

Thanks
best Regards
Rene

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 16 Jan 2013, 05:16 PM
Hi Rene,

Should we assume that by "change data source" you mean changing the connection string? We will need more information about your reports:
  • are they in xml format?
  • what data source do they use? 
In case you have trdx files, you can modify the provided xml file and change the connectionString manually. As a dynamic approach for connection string update, please check the described solution in this forum thread: Change Connection String at Runtime on Drillthrough Report - works for both trdx and ClassLibrary reports.
If you need more help on the matter, please send us the mentioned details and even better, a sample project illustrating the scenario.

All the best,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
ITA
Top achievements
Rank 1
answered on 16 Jan 2013, 06:21 PM
Hi,

during runtime, we have to create differtent "SQLite Databases" for different companies. So we have to change the Data Source during runtime. Each Database is a 100% copy of a standard Database in this project. Tables an SQL Statement are the same,  so we just
have to change the Data Source!

thanks
best regards
rene
0
Stef
Telerik team
answered on 21 Jan 2013, 05:17 PM
Hi Rene,

If databases are copies of each other, then you need to change the connection string for your application. Have you check the mentioned forum thread and the suggested approach in it (Change Connection String at Runtime on Drillthrough Report) and most precisely the usаge of user function to update the connection strings?

Let us know how it goes.

Greetings,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

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