Datasource variable

4 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 14 Jan 2013 Link to this post

    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
  2. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 16 Jan 2013 Link to this post

    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!

  3. DevCraft banner
  4. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 16 Jan 2013 Link to this post

    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
  5. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 21 Jan 2013 Link to this post

    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!

Back to Top