Connect Telerik Reporting with Postgres SQL

One of our customers required their Telerik Reporting application to connect with their Postgres SQL (for effect, no not Microsoft SQL Server but the open source Postgres SQL).

While at the outset it may appear to be almost impossible but this task is very easy to implement with Telerik Reporting.

We accomplish this with using ADO.NET driver for Postgres SQL. The same approach can be used for other databases like MySQL.

In this post, we will discuss how to get Telerik Reporting working on .NET Core 3.1.

The first thing is to understand that Telerik Reporting is a framework that has three distinct and independent pieces:

  1. Telerik Report Definition
  2. Telerik Reporting Host Application
  3. Telerik Report Viewer

First you would want to create the Telerik Report Definition (a trdp file). To create this, we use the Telerik Reporting Designer. By default, there is nothing that supports Postgres SQL in there. So, here is the first step – Download the NgpSql driver (the MSI installer).

Once done, this will add a new datasource to the SQL Data Source of the designer:

Click on the SQL Data Source, and add a new data connection. In the dropdown, please select the new available provider “Ngpsql Data Provider”:

Following this you will need to provide the connection string. The Postgres connection string is of the following format:

Host=<server name>;Database=<db name>;Username=<username>;Password=<password>

Provide the relevant SQL statement and complete creating the data connection. The rest of the remaining steps are the same as creating a regular Telerik Report definition.

Make sure that the data is as preview in the report.

The second step, is to configure the hosting application. Since we are now working with .NET core, you can start with the .NET Core WebAPI application template and add relevant nuget packages to the same. Detailed instructions are available here: https://docs.telerik.com/reporting/telerik-reporting-rest-service-aspnetcore-mvc-core3

This will make the host application provide the Telerik Reporting Service. You can check if this the reporting has been correctly setup by browsing to the URL: http://localhost/api/reports/formats

The extra step in the host application is to include an additional nuget package in the host application: Ngpsql

The next change in the host application is changing the connection string and its provider. Specify your connection string in the appSettings.json as follows:

Pay special attention to the providerName above.

Congratulations you are done!!

The third and final piece, the Telerik Report Viewer doesn’t require any changes.

Your host application (in my case a simple HTML 5 application) can now simply render the report from the host application.

References:

https://docs.telerik.com/reporting/knowledge-base/configuring-postgres-with-npgsql

https://www.telerik.com/forums/configure-standalone-report-designer-for-postgresql-data-source

https://docs.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-5.0#enable-cors

Advertisement

How to Download Telerik Software

Login to your account at Telerik.com

There are two ways to download Telerik products, doing so online as laid out in the instructions below or using the Control Panel, which is available for download from your account home page.

Once logged into your account, click the “Products & Subscriptions” button (Please note, the account in the screenshot is a test account, you may have different products listed other than DevCraft Complete)

Next, click on the appropriate product

On the next screen, choose the blue “Download Installer and other resources” button

Click on the product that you wish to install

On the next page, choose to either download the product or the latest internal build of the product. Please make ensure that the License type is “Purchase” and not “Trial”

Webinar: Starting out with aPaaS

Telerik has been at forefront of providing tools for improving developer experiences. Now, a new kind of technology is on the horizon called as aPaaS – Application Platform as a Service.

This technology enables enterprises to create better, cheaper and faster applications with very little code. This is going to be a big boost of developers who are constantly required to deliver top quality code in minimal time. This single technology can enable building visually immersive experiences across web, iOS and Android and engaging chatbots. Not just that, it provides full control over the application code and development experience for developers.

This platform is called Progress Kinvey Studio. In this webinar we will introduce what is aPaaS and Kinvey.

The webinar details are as follows:

When: Thursday, Sept 19 2019, 15:00 – 16:00 hrs (IST)

Register here: https://www.techgig.com/webinar/Beginning-aPaaS-Low-Code-Development-for-Web-Mobile-and-Chat-in-the-Real-World-1608

Presenter: Mr. Abhishek Kant, CEO, GTM Catalyst Pvt Ltd

Who should attend: Project Managers, Developers and CTOs

In the webinar Mr. Abhishek will go over:

*Understand aPaaS concepts
*Visual designer for building apps in a matter of minutes
*Write custom logic and UI to finetune the digital experience
*Round-trip code editing (legible code, and editing in your tool of choice) Code portability (no vendor lock-in)
*Enterprise data and authentication integration (use existing data sources)
*Access to cutting-edge features like Augmented Reality and Chatbots
*Simultaneous web, iOS, and Android development

In the Telerik tradition, we will be giving out 3 T-Shirts to top engaged participants at the webinar.

See you at the webinar!

Jan/Feb Webinars Cancelled

Dear Users,

Due to unforeseen circumstances, we will be cancelling all webinar sessions for January and February until further notice. We apologize for the last minute change.

We’ll keep you posted on calendar schedule and resumption.

Regards,

Telerik/Progress India Team

Getting Starting with Rollbase Platform on-Premise

In this tutorial, we will go over install Rollbase Platform on your environment. In this post we focus on installing Rollbase on windows server environment for Single Server/non-high availability development use. Post will cover the following areas

  • overview and Features
  • install
  • Database Configuration
  • Startup and overview

Overview of Rollbase:

Progress Rollbase enables you to build all of your business applications in one place from the comfort of your Web browser while writing a minimum amount of code (typically 80% clicks, 20% code). Reduce your development time and resource requirements, accelerate your time-to-market, simplify application delivery and deployment, and provide a proven cloud platform on which to build all of your custom business applications. With Progress Rollbase, you are in complete control of your development.

Continue reading

Telerik Report Designer

How To: Use SQLite with Telerik Reporting Standalone Report Designer

Couple of years ago, I created a video where I showcased how to use Telerik Reporting with WPF (Windows Presentation Foundation). WPF is a windows application development framework on Microsoft .NET stack. Telerik Reporting is a reporting solution which can be embedded in your ASP.NET/WinForms/WPF applications. You design reports, host it in your app and render within your apps. One of the question I got recently on that video was – “How to use Telerik Reporting with SQLite ?“. That’s an interesting question and probably one of the common scenarios you may face. In this post I will take a step by step approach on how to work with SQLite using Telerik Reporting Standalone Report Designer. Lets get started. Continue reading

2017

Webinar Schedule for Jan-Feb 2017

We are at the last week of 2016 and getting ready to welcome 2017. We wish you all a very Happy & Prosperous Happy New Year 2017. We here at Progress are busy trying to bring you new learnings in 2017. Our team has been brainstorming on possible topics for Jan/Feb 2017 webinars and we cant wait to make it live. In this blog post we take a look at the Jan/Feb 2017 Webinar Schedule. So read on. Continue reading

Data Direct Cloud

Resources from webinar “Using Salesforce data in your ASP.NET Web Application”

On Dec 15 2016, we finished yet another webinar. These webinars are our monthly webinars we do on 2/3/4 Thu of every month between 12-1PM IST. For this webinar our interest was to showcase how you can  easily consume your cloud data for e.g. Salesforce in your ASP.NET Web Applications using our product called “Data Direct Cloud”.

This blog post will be a recap of the webinar and i will provide you the slide deck & video recording of the webinar itself. Continue reading

Kendo UI DataViz

Resources from webinar “Visualizing Your Cloud Data using Kendo UI DataViz”

On Dec 08 2016 we finished yet another webinar here in Progress India. This time we focused on an enterprise scenario where in you have data in your cloud for e.g. may be Salesforce and you want to create beautiful looking Data Visualization out of that data. As part of the webinar we looked at Data Direct Cloud and Kendo UI products from our portfolio. This post is a recap of the webinar. You will find the deck and video recording of the webinar.

Continue reading

Resources from Webinar “A Conversation Experience in your CMS with Bots”

On Nov 17 2016 we conducted yet another webinar here at Progress India. We do these webinars almost every Thursday of the month between 12PM to 1PM. This time we focused on two technology – Microsoft BOT Framework & Sitefinity. This blog post is a recap of the webinar. You will find the video recording from the webinar. Continue reading

Nov – Dec 2016 Webinar Schedule

Its that time of the month when we tell you what we are thinking in terms of spreading knowledge for next 2 months. As you know we normally put up schedule for 2 months of webinar content upfront to you. You can decide which one you would like to attend and book your seats early. This blog post you will find our schedule for Nov & Dec 2016. We have some interesting ideas lined up for webinar. Continue reading

RadHtmlChart

How To: Create HTML5 Chart through code in your ASP.NET AJAX Applications

Almost 4 years ago just when i started working for Telerik or now Progress Software, i had written a blog post titled “Step by Step Guide to work with RadHtmlChart for ASP.NET AJAX”. The idea behind that blog post was to give you a step by step instruction on how to use the HTML5 Chart controls in our UI for ASP.NET AJAX suite. Couple of days ago i had a comment on that blog post where the user asked me “How to create the same chart from code behind i.e.entirely through code”. A common scenario if you ask me. So i thought of doing a step by step instruction  on how to create HTML5 chart entirely through code and this blog post will outline that. Continue reading