SubReport Data Connection Error

5 posts, 0 answers
  1. Christopher
    Christopher avatar
    3 posts
    Member since:
    Apr 2015

    Posted 15 May Link to this post

    I am getting an error of 'format of the initialization string does not conform to specification starting at index 0' for one of two subreports on my Telerik report.  The report works without issue in the report designer, but when using the report in a VS project I get the above error.

    I am having to make the connections dynamic to Access database files as that is what the parent application currently uses (an old deployed desktop application), and the database file is a project file for the user and is not always the same file to connect to.

    The issue is that the main report connects and gets the data fine, and so does one of the subreports, but the other subreport results in the above error.  I am using the report parameter method of setting the connection string.  I have checked to ensure both subreports are setup the same way in regards to the database connection being bound to the parameter, and the main report is passing this data to both identically.

    I am at a loss as to what is going on and any help would be greatly appreciated.

    Thanks,

    Chris

  2. Todor
    Admin
    Todor avatar
    384 posts

    Posted 16 May Link to this post

    Hello Chris,

    I have provided an answer to the support ticket you opened on a similar issue. For the benefit of our community I will summarize the main points also here.

    Make sure all named/shared connection strings are properly registered in the configuration file of the application that renders the reports.

    If Report Parameter AvailableValues come from a database the approach provided in the Change Connection String dynamically through a report parameter KB article cannot be used due to the workflow of our Reporting tool.

    We would need to research the particular project to be able to provide more valuable advices. Consider attaching a runnable sample that demonstrates the issue in the support thread (ID 1408887).

    Regards,
    Todor
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Christopher
    Christopher avatar
    3 posts
    Member since:
    Apr 2015

    Posted 16 May in reply to Todor Link to this post

    Thanks, I have updated the ticket with my response and the sample program I am creating.  For clarity to anyone reading this thread later, I will post my questions here as well.

    If I use one parameter to pass an ID value from the main report to a subreport, which then requires the use of AvailableValues for this, then passing the connection string as a parameter will not work?  Then why does this work without issue within the report designer, but only errors when running from the WPF sample exe?

  4. Christopher
    Christopher avatar
    3 posts
    Member since:
    Apr 2015

    Posted 17 May Link to this post

    As an update, I was able to get the report working by not utilizing the connection string as a parameter, but instead following the instructions located within this article (https://www.telerik.com/support/kb/reporting/details/changing-the-connection-string-dynamically-according-to-runtime-data).  After that the report ran without further issues.

    Thank you for your assistance Todor, your insight into how the report parameters work was what led me to search out the above alternative process.

    Thanks,

    Chris

  5. Todor
    Admin
    Todor avatar
    384 posts

    Posted 21 May Link to this post

    Hello Chris,

    If the approach for providing the connection string as Report Parameter value works in the Report Designer for the Report Parameter AvailableValues, there may be a default connection string that is used to fetch the available values. This connection string cannot be modified dynamically, e.g. to be taken from another Report Parameter. Currently, the only suitable approach is the one you have found.
    We are considering improving this behavior, e.g. to make passing the connection string to a Report Parameter AvailableValues database possible without the need to instantiate the report and to modify its definition.

    Regards,
    Todor
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top