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

configure standalone report designer for postgresql data source

15 Answers 1241 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 07 Nov 2019, 07:54 AM

i'm evaluating Telerik Reporting and would like to configure the Standalone Report Designer to use Postgresql as a Data Source.

the attached config files dont seem to work, but i'm not sure what's wrong with what i've done. using MY config files, the StandAlone report Designer does not show up.  using the config file(s) that came with the product, the designer comes up but of course it's not possible to pick Postgresql as a data source

 i'm using Postgresql 12 with Npgsql 4.1.1 as the driver in a 64bit Windows 10 Pro desktop machine.

 

i followed the instructions in:

https://www.telerik.com/support/kb/reporting/accessing-and-managing-data/details/how-to-register-sqldatasource-data-providers-without-driver-installation
to modify the default config file (Telerik.ReportDesigner.exe.config  as well as Telerik.ReportDesigner.x86.exe.config)

i've done:

nuget install Npgsql -Version 4.1.1

and put all the required dlls in same folder as Telerik.ReportDesigner.exe in C:\Progress\Telerik Reporting R3 2019\Report Designer

and my config file(s) is as follow (the x86 is same as the 64bit file)

 

<?xml version ="1.0"?>
<configuration>
<configSections>
<section
name="Telerik.Reporting"
type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting"
allowLocation="true"
allowDefinition="Everywhere"/>

    <section
        name="Telerik.ReportDesigner"
        type="Telerik.ReportDesigner.Configuration.ReportDesignerConfigurationSection, Telerik.ReportDesigner.Configuration"
        allowLocation="true"
        allowDefinition="Everywhere"/>    
</configSections>

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <!--
      <probing privatePath="path-to-the-assemblies"/>
      -->
      <dependentAssembly>
        <!-- Required for interoperability with older versions of Telerik Reporting -->
        <assemblyIdentity name="Telerik.Reporting" culture="neutral" publicKeyToken="a9d7983dfcc261be"/>
        <bindingRedirect oldVersion="0.0.0.0-13.2.19.1030" newVersion="13.2.19.1030"/>
      </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="Npgsql" culture="neutral"publicKeyToken="5d8b90d52f46fda7"/>
        <codeBase version="4.1.1.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\Npgsql.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Buffers" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="4.0.3.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Buffers.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="1.0.0.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\Microsoft.Bcl.AsyncInterfaces.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Memory" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="4.0.1.1" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Memory.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Numerics.Vectors" culture="neutral"publicKeyToken="b03f5f7f11d50a3a"/>
        <codeBase version="4.1.4.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Numerics.Vectors.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" culture="neutral"publicKeyToken="b03f5f7f11d50a3a"/>
        <codeBase version="4.0.5.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Runtime.CompilerServices.Unsafe.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Text.Encodings.Web" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="4.0.4.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Text.Encodings.Web.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Text.Json" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="4.0.0.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Text.Json.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks.Extensions" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="4.2.0.1" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.Threading.Tasks.Extensions.dll"/>
  </dependentAssembly>
  
  <dependentAssembly>
        <assemblyIdentity name="System.ValueTuple" culture="neutral"publicKeyToken="cc7b13ffcd2ddd51"/>
        <codeBase version="4.0.0.0" href="FILE://C:\Progress\Telerik Reporting R3 2019\Report Designer\System.ValueTuple.dll"/>
  </dependentAssembly>
  
    </assemblyBinding>
  </runtime>

  <connectionStrings>
    <add name="Telerik.Reporting.Examples.CSharp.Properties.Settings.TelerikConnectionString"
        connectionString="TELERIK_CONNECTION_STRING"
        providerName="System.Data.SqlClient" />
  </connectionStrings>
  
  <Telerik.ReportDesigner DefaultWorkingDir="Examples">
  </Telerik.ReportDesigner>

  <system.data>
<DbProviderFactories>
  <add name="Npgsql Data Provider"
   invariant="Npgsql"
   description=".Net Framework Data Provider for Postgresql Server"
   type="Npgsql.NpgsqlFactory, Npgsql, Version=4.1.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
</DbProviderFactories>
  </system.data>
<!-- Add assembly references -->
<!--
<Telerik.Reporting>
<AssemblyReferences>
<add name="MyFunctions" version="1.0.0.0" />
</AssemblyReferences>
</Telerik.Reporting>
-->

<!--  
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\Temp\Telerik.ReportDesigner.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
-->
</configuration>

Back to Top

15 Answers, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 11 Nov 2019, 11:30 PM

Hi John,

This appears to be because of the naming of the href value located in the codeBase element for dependent assemblies. The codeBase href is expecting an absolute path instead of a relative path. Generally, applications using .NET will look in the current directory for assemblies. Although sometimes they need to be told where to look. See the attached config samples that should work with your scenario. Note that the config file names should be changed to Telerik.ReportDesigner.exe.config.

If the issue persists, let me know and I will convert this to a support ticket so we can investigate more thoroughly.

Please try out the attached configs and let me know the results. Thank you for evaluating Reporting and I look forward to your reply.

Regards,


Eric R | Technical Support Engineer
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
0
John
Top achievements
Rank 1
answered on 13 Nov 2019, 03:50 AM

Thanks for the files, Eric, but none of them worked. (i did rename them to 

Telerik.ReportDesigner.exe.config and Telerik.ReportDesigner.x86.exe.config).

 

Are there log files I could look at?

 

I'm bothered that the Report Designer just doesnt show up without report messages to the user.

 

also, the supported runtime for the Report Designer is .Net Framework 4.0.

the dlls that i downloaded sometimes are in folders labeled net461, netstandard1.1, netstandard2.0, netstandard2.1,

netcoreapp2.0, and / or netcoreapp3.0. as much as possible, which ones should i choose ?

 

Does Report Designer support .Net Core versions since .Net Core is our preferred runtime?

0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 13 Nov 2019, 03:42 PM

Hi John,

Telerik Reporting can be used with .NET Core Applications when embedding the Reporting Engine or using the HTML5 Report Viewer. At this time however, the Stand Alone Report Designer is delivered with the default Telerik Reporting installation and targets .NET 4.0 as previously noted. Additionally, I am not certain providing log files will resolve the issue. 

With that said, if I understand the scenario correctly. It should work with the PostgreSQL assemblies in the default Report Designer installation folder and one of the previous configurations. See the below screenshot for a visual reference. 

I recommend zipping up your default installation folder and attaching it to this thread. If you are unable to attach the folder to a public thread, I can still convert this to a Support Ticket so that all communication is then handled privately. Let me know if you would like to pursue this option.

In the meantime, let me know if you need any additional information. Thank you and I look forward to your reply.

Regards,


Eric R | Technical Support Engineer
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
0
Shawn
Top achievements
Rank 1
answered on 31 Jan 2020, 04:24 PM

Any update on this? I am trying something similar for getting Postgres to work with the Designer app, no luck.

Currently evaluating the tool, if this isn't easily overcome we'll have to look at other options.

Thanks!!

0
Neli
Telerik team
answered on 05 Feb 2020, 01:07 PM

Hello Shawn,

To be able to use  Postgres, follow the steps below:

1. Firstly you need to install ADO .NET data provider for Postgres (for example: Npgsql version 3.2.7). Note that the SqlDataSource component will list and work with any ADO.NET provider that is correctly registered on the device;

2. Add SQL Data Source -> Build new data connection -> select Npgsql Data Provider;

3. Add the Connection string in the field. For example:

Host=reporting7x64.telerik.com;Username=postgres;Password=telerik;Database=postgres

4. Click Next -> fill in the Select Statement  (you may use the Query Builder)-> Finish.

All of this is demonstrated in the attached muted video. It can be opened via any web browser which supports Flash (for example Internet Explorer). If you prefer to avoid installing a new driver, you can refer to How to register SqlDataSource data providers without driver installation KB article for details on how to accomplish this scenario. 

Once you install the Npgsql data provider you can connect to the Postgre database also in the Visual Studio Report Designer. 

Regards,
Neli
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
0
Shawn
Top achievements
Rank 1
answered on 05 Feb 2020, 03:09 PM

Neil,

I tried that method with the 4.1.2 driver version of Postgres and got nothing but errors when attempting to test the connection

I got all of the required packages from NuGet, remapped mismatched versions to the latest expected version, still got errors.

Missing assemblies, mismatching versions, etc.

Thanks!!

0
Neli
Telerik team
answered on 05 Feb 2020, 03:13 PM

Hello Shawn,

I have also reproduced an error when 4.1.2 is used. For that reason, I suggest to test with Npgsql version 3.2.7.

Regards,
Neli
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
0
Shawn
Top achievements
Rank 1
answered on 05 Feb 2020, 03:34 PM

That worked with 3.2.7.

It is pretty dated though, any idea(s) as to what is needed to get newer versions to work?

Any plans on migrating to .NET Core 3.0? Might help with managing various versions of assemblies.

Thanks!!

0
Neli
Telerik team
answered on 05 Feb 2020, 04:03 PM

Hi Shawn,

You can use a Telerik report with Postgres in .NET Core3 project. Note that you need to add Npgsql through a NuGet package in the application. If you selected  Embedded connection string in step2 (Data connection options dialog) while you were configuring the SQL DataSource then you don't need to add a connection string in the application.

If you selected Shared (named) connection string, then you need to add a connection string in the appsettings.json file. For example:

"postgres": {
  "connectionString": "Host=reporting7x64.telerik.com;Username=postgres;Password=telerik;Database=postgres",
  "providerName": "Npgsql"
}

 

Regards,
Neli
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
GUJ
Top achievements
Rank 1
commented on 01 Oct 2024, 09:40 AM

I have used Shared (named) connection string, and added a connection string in the appsettings.json file

like this

 "AllowedHosts": "*",
 "ConnectionStrings": {
   "providerName": "Npgsql",
   "JRMLive": "Host=68.45.18.9;Port=5432;Username=postgres;Password=test@123;Database=JRMLive"
 }

when calling report in HTML report viewer from visual studio getting error
------------- InnerException -------------

Keyword not supported: 'host'.

 

Please give any solution, tried everything

Todor
Telerik team
commented on 04 Oct 2024, 05:40 AM

Hello GUJ,

The article section Add Configuration Settings to the Program.cs file (Optional) provides examples for registering connection strings in the JSON configuration.

In the configuration from your snippet, the connection string name is not related to the data provider. You may use the following code instead:

"AllowedHosts": "*",
"ConnectionStrings": {
	"JRMLive": {
		"providerName": "Npgsql",
		"connectionString": "Host=68.45.18.9;Port=5432;Username=postgres;Password=test@123;Database=JRMLive"
	}
}

The other options from the article should also work.

0
Shawn
Top achievements
Rank 1
answered on 05 Feb 2020, 04:14 PM

I have the rendering side running on .NET Core already -- right now on Mac, need to do more testing on Linux.

I was referring to the Designer side of things since .NET Core 3.0 supported WPF.

Thanks!!

0
Neli
Telerik team
answered on 10 Feb 2020, 12:14 PM

Hello Shawn,

Basically, for the .NET Core WPF project, you may apply the same approach. In this case, the connection string should be added in App.config file. You can also check our demo located in the installation folder of Telerik Reporting:

C:\Program Files (x86)\Progress\Telerik Reporting <Version>\Examples\CSharp\WpfCoreDemo.

Regards,
Neli
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
0
Shawn
Top achievements
Rank 1
answered on 20 Feb 2020, 03:09 PM

Neil,

When it comes to the shared data source and appsettings.json -- can the connection string be set programatically before the report runs?

I ask because we use a tool for storing the usernames and passwords, something we can't just have sitting in a file.

Thanks!!

Shawn

0
Neli
Telerik team
answered on 25 Feb 2020, 08:26 AM

Hello Shawn,

There are 2 options that I can suggest:
1) Set the connection through a report parameter as it is described in Change Connection String dynamically through a report parameter KB article. This approach is recommended when it is necessary to modify the connection string run-time in the same application and the Report Parameters do not have AvailableValues coming from the database.
2) Apply the approach from Changing the connection string dynamically according to runtime data KB article. Generally, we do not recommend this approach as it requires additional programming and is more difficult to maintain, especially when there are changes in the Reporting API.

 

Regards,
Neli
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
1
Zoran
Top achievements
Rank 1
Veteran
answered on 02 Dec 2020, 12:22 PM
With NpgSql version 3.2.7 is working for me. But you need to enable connection with latest NpgSql.
0
Neli
Telerik team
answered on 02 Dec 2020, 01:27 PM

Hi Zoran,

You can use the latest version of Npgsql with our Reporting solution. I would suggest to check How to Configure Postgres with Npgsql? KB article. The usage of the Npgsql data provider version 3.2.7+ requires adding binding redirects.

Please, test the suggested solutions from the article and let us know if you need further assistance.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
John
Top achievements
Rank 1
Shawn
Top achievements
Rank 1
Neli
Telerik team
Zoran
Top achievements
Rank 1
Veteran
Share this question
or