How to build and install the Postgres plugin in FastReport .NET

2024-08-12

Our FastReport .NET has quite rich capabilities and wide functionality. Today we will look at connecting to the database using the FastReport plugin for the report designer.

Below is an example of the FastReport .NET installation path that would be: C:\Program Files (x86)\FastReports\WinForms

1.    Go to the installation folder and then follow the path Extras\Core\FastReport.Data\FastReport.Data.Postgres

Important! The path should be exactly like this; there may be outdated projects along other paths.

2.    We find there the project file FastReport.Data.Postgres.csproj in Visual Studio. 

Important! There are several files in this folder, you need to open this one.

3.    Several projects will open in Visual Studio. Select FastReport.Data.Postgres and right-click on it, and then click “Set as Startup Project” in the context menu.

Choosing the FastReport.Data.Postgres project in Visual Studio

 

4.    Select the “Release” build and the “net462” target.

Selecting a build and target in Visual Studio

 

5.    In the decision tree, expand the project -> Dependencies -> net462 -> Projects and Packages. Pay attention to the exclamation marks in the triangles.

Decision Tree in Visual Studio

 

6.    Delete “FastReport” in “Projects”. We don’t delete anything else in the dependencies. Now you need to add nuget packages FastReport.N et and Npgsql . 

Important! FastReport.Net must be added as a package, since the method of adding FastReport.dll no longer works.

7.    In the “Dependencies” context menu, select “Manage NuGet Packages”.

Connecting NuGet packages

 

8.    You need to add two package sources: nuget.org and the source referring to our nuget-server, or to the local folder  C:\ProgramFiles(x86)\FastReports\WinForms\Nugets.

9.    Select the nuget.org source.

Connecting nuget.org in Visual Studio

 

10.    On the “Installed” or “Updates” tab, find the Npgsql package and click on it.

Connecting the Npgsql package in Visual Studio

 

11.    We look on the right and see the following information: the current version associated with the project is 3.2.7, the latest version of the package is 8.0.3, the Uninstall and Update buttons.

12.    Click on the Update button.

13.    Select the second package source. The example uses the Nuget Server of Fast Reports Inc.

Fast Reports Private NuGet-server

 

14.    Go to the Browse tab and enter fastreport.net in the search field 

Search by packages in a private NuGet server

 

15.    Select the FastReport.Net package or FastReport.Net.Demo for the trial version. 

Important! It should be one of these two packages, as the FastReport.Net.Pro package is outdated and no longer used. 

16.    We carefully look at the version and select the one that we have installed. This manual covers 2024.2.12 version.

Checking for the installed package version

 

17.    Click the Install button. We accept the license agreement and wait for the package to be installed.

18.    Right-click on the FastReport.Data.Postgres project and click Build in the context menu.

Building the project

 

19.    At the bottom left we see the inscription “Build succeeded.” This means that the plugin is built correctly and Visual Studio can be closed.

20.    Go to the folder where FastReport .NET is installed, as indicated at the beginning of the instruction, this is C:\Program Files (x86)\FastReports\WinForms. There should be "Designer.exe" here.

21.    We move from this folder to the following folders along the path: Extras\Core\FastReport.Data\FastReport.Data.Postgres\bin\Release

22.    We find 2 folders “net462” and “net6.0-windows7.0”, go to the net462 folder.

23.    Copy the following files from this folder: 

FastReport.Data.Postgres.dll, 
Npgsql.dll, 
Microsoft.Bcl.AsyncInterfaces.dll, 
Microsoft.Extensions.Logging.Abstractions.dll, 
System.Threading.Tasks.Extensions.dll, 
System.Memory.dll 

24.    Paste the copied files into the folder where Designer.exe is located.

25.    Run “Designer.exe”, go to the File -> Options menu (View -> Options if the Ribbon interface is disabled). Go to the “Plugins” tab.

26.    If there is already a FastReport.Data.Postgres plugin, you need to remove it and repeat step 21.

Window for connecting plugins in the report designer

 

27.    Click on the “Add” button, go to the designer folder, in this example it is  C:\Program Files (x86)\FastReports\WinForms 

28.    Select the FastReport.Data.Postgres.dll file and click the “Open” button. The plugin appears in the list.

Successful connection of the plugin to the designer

 

29.    Pay attention to the text at the bottom left, which indicates that the Designer needs to be restarted. Click the OK button. Close the designer.

30.    Launch Designer.exe again. If you have followed this instruction, the connection to Postgres should appear in the list of connections.

List of available connections to data sources

 

31.    If you see the following errors when trying to connect:

Plugin connection error

 

Then you need to close the designer, copy the file indicated in the error from the С:\Program Files(x86)\Fast Reports\WinForms \Extras\Core\FastReport.Data\FastReport.Data.Postgres\bin\Release\net462 to the folder where you have Designer.exe.

In FastReport .NET, it is very easy to assemble and connect various connectors to a variety of databases.

November 26, 2024

Installing FastReport on .NET 8.0 and Creating a Simple Report

The purpose of this article is to explain step by step how to install FastReport on .NET 8.0 and how to create a simple report. Taking the reporting process from the beginning, it will show how to connect, design and view reports.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
July 26, 2024

Updating HTMLObject as a plugin for FastReport .NET

Detailed instructions for using the new HTMLObject plugin, which uses splitting DOM HTML into FastReport report objects.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.