Live Chat Icon For mobile
Live Chat Icon

Connecting Your Reports to a PostgreSQL Data Source

PostgreSQL

We are excited to announce that the Bold Reports Designer supports a PostgreSQL data connector as of the October 2020 Bold Reports release. Now, you can connect to a PostgreSQL data source and embed data into a report.

PostgreSQL is a powerful, object-relational database system. It extends the SQL language combined with many features that safely store and scale the most complicated data workloads.

This blog post will walk you through the steps to connect your PostgreSQL database to Bold Reports.

Prerequisites

Choose PostgreSQL connector

As a first step, launch the Bold Reports Designer from your Windows Start menu or desktop shortcut.

Report Designer
Report Designer

To create a new data source with a PostgreSQL connection, select the data source icon on the right.

Data Panel
Data Panel

In the Data configuration panel, click NEW DATA.

Data Configuration Panel
Data Configuration Panel

The Datasources panel lists the data connectors as shown in the following screenshot.

Data Connectors
Data Connectors

Choose the PostgreSQL connector. The PostgreSQL data configuration panel will be displayed.

PostgreSQL configuration panel
PostgreSQL configuration panel

Connecting with the PostgreSQL database

We have used the Product Catalog table for this demonstration. You can create the same table in your database using the PSQL command line tool by following these steps:

.

  1. Download and extract the product-catlog.sql file in your system.
  2. Then, launch SQL Shell (psql) from the Windows Start menu.
  3. After that, choose the default PostgreSQL server details like server name, database, port number, and username, and provide the password for the user postgres.
  4. Execute the commands in the following text box. They will create a Product catalog table inside the Postgres database.
\i {{product catalog file location}}

E.g., \i D:/product-catalog.sql

PSQL
PSQL

Provide the server name, port number, username, password, and database of the PostgreSQL server and check the Save Password checkbox.

PostgreSQL configuration
PostgreSQL configuration

Then click Connect to create a data source.

Design query

After connecting, you will be in the query design view with the available tables displayed in the left pane of the tree view.

Query Designer
Query Designer

Drag the ProductCatalog into the design pane. Execute the query and then click Finish.

Creation of Dataset
Creation of Dataset

Now, data fields will be created in the dataset.

Data List
Data List

Design your report

Using the dataset created, we will design a product catalog report with detailed information on bike products. Refer to the documentation to create a similar report design.

After designing it,  our report will look like in the following screenshot.

Product Catalog Design
Product Catalog Design

Preview report

You can preview the report at design time using the built-in Bold Reports Viewer to ensure the report design is as expected by switching to preview mode.

In the preview, our report will display the list of bike products along with their respective details, like in the following screenshot.

Product Catalog preview
Product Catalog preview

Conclusion

We hope this blog post helps you connect to the PostgreSQL database using Bold Reports. To learn more about the PostgreSQL panel, refer to the PostgreSQL documentation. I have also attached the generated RDL file for further reference.

If you have any questions, please post them in the comments section below. You can also contact us through our contact page or, if you already have an account, you can log in to submit your support question. Feel free to check out the Bold Reports Embedded Reporting demos and documentation to explore the available tools and their various customization features.

Bold Reports now comes with a 15-day free trial with no credit card information required. We welcome you to start a free trial and experience Bold Reports for yourself. Give it a try and let us know what you think!

Stay tuned to our official Twitter, Facebook, LinkedIn, Pinterest, and Instagram pages for announcements about new releases.

Leave a Reply