End User Designer Preview Error

Posted by: mschmitz on 31 May 2020, 9:13 pm EST

    • Post Options:
    • Link

    Posted 31 May 2020, 9:13 pm EST

    I’m running ActiveReports 11.3.13058.0 through Microsoft Visual Studio Professional 2013

    I was getting close to making a post about an error I was receiving from the end user designer but think I was able to fix it. Figured I’d share the solution in case someone else runs into the same problem. I’m using a modified version of the end user designer where we hide the credentials of the account performing the queries from the user.

    We do that by preventing the user from editing the datasource where they cannot view the credentials. When loading a report the connection string is loaded into the data source after the report is loaded in the application. When saving, the connection string is set to empty before saving then placed back after saving.

    I was receiving this error after opening or saving a page report and then pressing preview:

    Exception details:

    GrapeCity.ActiveReports.ReportException: An unexpected error occurred. Additional information: ‘The ConnectionString property has not been initialized.’

    I tried reloading the report after saving and refreshing the data after opening and saving but had no luck. When I inspect the dataset object in the code, I did see the connection string there but when pressing preview it would say that the connection string is not initialized.

    If I go into a dataset and modify a query slightly like putting a space somewhere and then pressing the green checkbox icon to validate the query, then the preview worked again. After noticing that I tried preforming validations on data sources and datasets in code but that didn’t fix the problem either.

    What ended up working is adding “reportDesigner.IsDirty = true;” right after opening the report and saving the report.

  • Posted 1 June 2020, 2:47 am EST

    Hello,

    Thanks for sharing the solution with us. It would be helpful for us and our customers.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels