Hi, sorry for the lack of experience in object data source, my question is I am making a class to retrieve the data from postgresql db and I am using npgsql. After creating the dll, I put it in the bin folder of my TRS as what in the tutorial stated and added it in the AssemblyReferences. Do I also need to add the dll of Npgsql because when I did that, it gives me the following error
""
Or how do you retrieve the data from postgresql as object data source?
If you have installed the Npgsql driver, you wouldn't need to reference the driver assemblies, please visit the How to Configure Postgres with Npgsql? - Telerik Reporting article for more details on this.
Regarding the error itself, Telerik Report Server is an MVC web application targeting.NET Framework version that does not fully support .NET Standard 2.0. Please try to apply the workaround from the asp.net - You must add a reference to assembly 'netstandard, Version=2.0.0.0 - Stack Overflow thread to resolve this limitation.
The Web.config file of the Report Server can be found at the following path:
C:\Program Files (x86)\Progress\Telerik Report Server\Telerik.ReportServer.Web
Hello Trudy,
If I understand correclty, you are attempting to use the Npgsql data provider in the Telerik Report Server product, is that correct?
In this case, I highly recommend using the MSI installation approach - MSI Installation - Npgsql 3.2.7, as the installer will automatically install and configure this data provider for your system. This will allow for the Report Server to also load and use it without needing to edit configuration files or copying and pasting assemblies to various folders.
The downside of the installation approach is that it offers a bit older version as the newer versions are not available for installation through MSIs. If this is a problem for you, and you would prefer to use a newer version, you can instead apply the instructions from the .NET Framework Manual Configuration section.
However, you would need to slighly adjust steps 4 and 6 from the above seciton for the Report Server Manager and for the Service Agent:
Report Server Manager
Service Agent
The Report Server Manager setup is necessary so that the Npgsql provider can be loaded when the reports are rendered in a report viewer/designer while the Service Agent setup is for the cases where the reports are rendered in scheduled tasks, data alerts, etc.
This approach is a lot harder to implement since you need to verify that each assembly related to Npgsql is present in both directories, with the correct version, and that the configuration file are correctly edited with the necessary binding redirects.
For that reason, I would like to again recommend using the MSI installation approach. Note that if you use this approach, you must remove any edits that you have made to the config file regarding the Npgsql data provider, such as the DbProviderFactories entry mentioned in the last reply.
I hope that the provided information and suggestions will help install the Npgsql provider for the Report Server. In case you need further assistance, please let me know which approach you decided to use and send me detailed logs with the errors - Troubleshoot Report Server Manager - Telerik Report Server.
If you chose to use the approach with the manual configuration, I may also need to look at the edited config file to verify that all necessary settings are present.
Hi Dimitar,
Support has replied that my Npgsql.dll that I copied to the Report Server bin directory was for .NET core and not .NET Framework so that was why it wouldn't work. I will try your method later on, but have my setup working now by using my own REST API to serve up the reports to my angular client UI using the Telerik Report Viewer.