logo
small logo
  • Products
  • Buy
  • Support
  • About
  • Customer panel Support
    • en
    • de
    • JP
    • ZH
  • Home
  • /
  • Articles
  • /
  • Connecting to a PostgreSQL database in .NET application
  • Using the plug-in connector to Oracle in FastReport.NET

    September 6, 2018

    Perhaps you have never used plug-ins for the report designer FastReport .NET. Then this

    read more
  • How to connect to SQLCe

    November 11, 2019

    Microsoft SQL Server Compact Edition is a simple local relational database that doesn't require installation,

    read more
  • How to connect to OracleDB from FastReport .NET

    November 15, 2019

    First of all, you can use the ODBC connector. But it is fraught with a

    read more
  • How to use Plugin Manager

    September 3, 2019

    FastReport .NET provides a plugin mechanism for extending the functionality of the report designer. Most

    read more
  • Connection plugin for Cassandra from FastReport .NET

    August 18, 2022

    We are pleased to present you a new plug-in for configuring а connection to

    read more

Connecting to a PostgreSQL database in .NET application

November 16, 2022

Connecting to a PostgreSQL database in .NET application

Our FastReport .NET offers rich features and wide functionality. Today we will look at how to connect to a database through the FastReport plugin for the report designer. This plugin is based on the Npsql.dll library.

First, let's figure out how to build the right plugin for FastReport .NET. After that, we will create a connection between our database and the report.

First, we should build a plugin to connect to PostgreSQL. For this, go to the directory where your FastReport .NET is installed and follow this path: Extras\Core\FastReport.Data\FastReport.Data.Postgres. Next, open the project FastReport.Data.Postgres.сsproj. Often you will see these errors when you open it for the first time:

Errors when connecting to PostgreSQL

 

Don't worry. To deal with it, just remove the FastReport project from dependencies. Instead, add a reference to FastReport.dll, which is located in the folder with the installed FastReport .NET.
 
Step 1. Remove the project dependency.

Removing the project dependency

 

Step 2. Go to the tab for adding references

Adding references

 

Step 3. Click “Browse…” and go to the directory with the already installed FastReport.NET.

Reference manager

 

Step 4. Select FastReport.dll from the list of files.

FastReport.dll

 

Step 5. Build the project and you will see that there are no errors.

Building the project without errors

 

We have successfully built the PostgreSQL connector, now let's add it to the report designer. It will be easy.

Open the report designer directly, go to its settings and connect the dll file to make our connector work properly.

Report designer settings

 

Then we go via the following path: Extras\Core\FastReport.Data\FastReport.Data.Postgres\bin\Debug\net452 and select the FastReport.Data.Postgres.dll file, which we will add to the project.

Plugin settings

 

Next, restart the report designer and select “Add Data Source” in the “Data” tab.

Add Data Source

 

Now click on “Add Connection” and select the PostgreSQL connection.

Selecting a type of connection

 

Enter data and watch whether it is being connected properly.

Data Connection Wizard

 

In this article, we have learned how to connect the PostgreSQL database to the report designer. As you can see, FastReport .NET allows to easily build and add various connectors to various databases.

about product buy
avatar
Marat Alaev
QA
Fast Reports Team: Marat Alaev - Quality Assurance at Fast Reports
.NET FastReport Data Source Plugin

Add comment
logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Buy
  • Download
  • Documentation
  • Testimonials
  • How to uninstall
  • FAQ
  • Tutorial Video
  • Forum
  • Support SLA
  • Articles
  • Our News
  • Press about us
  • Resellers
  • Extended licensing
  • Contact us

© 1998-2023 by Fast Reports Inc.

  • Privacy Policy

Trustpilot