How to initialize data source when opening trdp file

1 Answer 12 Views
Binding DataSources Report Designer (standalone) Report Wizard
Stephen
Top achievements
Rank 1
Stephen asked on 19 Apr 2024, 04:52 PM

I'm relatively new to the Standalone Report Designer, so I apologize if this is expected behavior. I'm connecting to Postgres and have everything set up correctly (AFAIK). If I open the .NET Report Designer via the EXE, the data connection initializes and I get data. However, if I click on a TRDP file to open the designer, the data connection doesn't initialize and I get an "Unable to establish a connection to the database" message with inner exception "Cannot load type for DbProviderTypeName "Npgsql.NpgsqlFactory". Why would opening the EXE directly be any different from opening via TRDP? This feels like a bug, but there may some documentation I just haven't made it to yet.

My current setup:

  • Standalone Report Designer v18.0.24.305
  • Npgsql v6.0.10
  • Npgsql.dll exists in the same directory as Telerik.ReportDesigner.Net.exe
  • Connection string and assembly reference added to Telerik.ReportDesigner.Net.dll.config
  • config file snippet:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <connectionStrings>
        <clear />
        <add name="Telerik.Reporting.Examples.CSharp.Properties.Settings.TelerikConnectionString" connectionString="Data Source=No Local Servers Found!;Initial Catalog=AdventureWorks;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
        <add name="{theName}" connectionString="{theConnectionString}" providerName="Npgsql" />
    </connectionStrings>
  
    <Telerik.Reporting>
        <AssemblyReferences>
            <add name="Npgsql" />
        </AssemblyReferences>
    </Telerik.Reporting>
</configuration>

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 24 Apr 2024, 11:01 AM

Hello Stephen,

How the designer is opened should not affect its data providers.

Still, there are two versions of the Standalone Report Designer, and the TRDP/TRDX/TRBP file associations on your system may use the .NET Framework version of the designer, which I assume does not have the Npgsql data provider set up.

You may notice the splash screen of the .NET version is different from the splash screen of the .NET Framework version.

Standalone Report Designer for .NET:

.NET Framework Standalone Report Designer:

Alternatively, you can go to the File -> Help page and verify which target framework you are using.

Please, test this out and let me know if adjusting the file associations on your system helped.

Best Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Stephen
Top achievements
Rank 1
commented on 24 Apr 2024, 01:31 PM

Hey Momchil,

Thanks for the response. I had already associated those files with the .NET designer, and I confirmed the correct version via splash screen, Help page, and executable properties.

Splash Screen

Help Page

Executable properties

Momchil
Telerik team
commented on 29 Apr 2024, 02:12 PM

Hi Stephen,

Thank you for verifying.

I tested this locally and can confirm it is a bug with the .NET version of the Standalone Report Designer.
It appears that opening the designer through a file changes its default working directory as the Npgsql assembly will be resolved correctly if you copy it to the same directory as the report definition file you are opening.

I have logged a bug item on your behalf in our Public Feedback Portal so you can easily track its status.

External assemblies are not loaded by the Standalone Report Designer for .NET when its opened using the TRDP/TRDX/TRBP file associations

To thank you for bringing this to our awareness, I am updating your account's Telerik Points as well.

In the meantime, I can suggest opening the designer through a shortcut or the executable and taking advantage of the Recent Documents list to open the desired report.

I hope this helps.

Stephen
Top achievements
Rank 1
commented on 29 Apr 2024, 05:23 PM

Hey Momchil,

Thanks for validating the bug and filing the report! Good call using the Recent Documents jumplist; that'll help a lot. To cover all my bases, I've also copied the Npgsql assembly to the same folder I keep my reports in so all methods work. I look forward to seeing the fix in an upcoming release.

Thanks,
Stephen

Tags
Binding DataSources Report Designer (standalone) Report Wizard
Asked by
Stephen
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or