Skip to main content

How Do I Connect to a PostgreSQL Data Source?

note

In this article we demonstrate how to connect a Report Template to a PostgreSQL server. For more details about the Connection Editor, see the Connection Editor Reference.

What is Needed to Establish the Connection

A PostgreSQL Npgsql ADO.NET connector:

  1. Download version 4.0.10 of Npsql from github (the file Npgsql-4.0.10.msi). Do not install version 4.1 or later – they will not work!
  2. Double-click on the .msi file to begin the installation.
  3. Accept the EULA.
  4. When the Custom Setup dialog appears, click on "Npgsql GAC Installation" and select "Entire feature will be installed on local hard drive".

  1. Click on Next
  2. Click on Install
  3. Click on Finish

Connect Your Report Template to PostgreSQL

From Microsoft Word, Excel, or PowerPoint, navigate to the Fluent Manager tab. Once on the Fluent Manager tab, click on the upper half of the Data Sources button. This will bring up the Connection Editor.

  1. In the Connection Editor window click on the New tab.
  2. Click on PostgreSQL Database in the SQL section. The Details pane will change to prompt you for your data source details.

  1. Enter a Name for your data source connection.
  2. Type or paste the name of the desired PostgreSQL server, or browse to the location of the PostgreSQL server. This list will auto-populate with the names of PostgreSQL servers on your network configured to respond to a network query asking for their names. You can type in the name or select from the list.
  3. Enter the name of the desired database. This list will auto-populate from the PostgreSQL server once it is set. In most cases you will also need to enter your username and password for Report Designer to auto-populate the list of databases. You can type in the name or select from the list.
  4. Enter your credentials. The Fluent public PostgreSQL server credentials are: Server: postgre.windward.netDatabase: paglia Username: demo Password: demo
  5. User and User Owned are the same thing for PostgreSQL. User will pull the metadata of just the tables created for a database. System will also pull the system tables PostgreSQL adds to the database used to administer and configure each database.
  6. Click on Add, then Test, to test your connection. If all parameters and credentials are correct and a connection is made, you will receive a successful notification.
  7. Click on Close to save your information

Other (Optional) Connection Editor Fields

FieldDescription
Display TablesUser Owned is selected by default. Select User & System to retrieve the metadata of the tables created for a database and the system tables used to administer and configure each database.
Read in metadataCheck this to read in additional information from the database, primarily the descriptions of tables, views, and columns, and the primary key - foreign key relationships. You should always keep this checked.
Use Connection StringYou can enter the connection string directly instead of entering the Database and Credentials. When unchecked it will display the connection string Report Designer generated from your settings.
Root DirectoryThis is the optional default directory for any Import Tag requests where the requested file does not have an absolute path. If left blank, Report Designer will use the directory where the data source file is located. If the data source is not a file it will use the directory where the template is located.