SQL-based Reports
In Patfhinder you can use SQL to create highly customizable reports providing exactly what you need.
From the report management create a new SQL based report.
Setting up the Database connection
In the SQL based report database selection dialog window, you can define your connection for database queries. The dialog window provides the following fields to fill out:
![](../../../__attachments/3349053562/sql_based_01.png?inst-v=f1245147-b616-4101-98c2-c12a7cc79779)
Use current connection: Check this box to use the current database connection for creating your report.
Hostname/ IP: Assign the hostname or IP address of the database.
Login: Define the log in username.
Password: Define the log in password.
Database: Define the name of the database.
Port: Define the port number.
Server-Type: Define the server type. You can also test the connection to the database here.
Enable encryption: Check to enable encrypted connection.
Defining the query
![](../../../__attachments/3349053562/sql_based_02.png?inst-v=f1245147-b616-4101-98c2-c12a7cc79779)
On the left (1) there will be a list of all available tables. Drag one to the right (2) to automatically create a simple SELECT statement for that table.
Now you can adjust the query as needed.
Click on next to continue.
Results
![](../../../__attachments/3349053562/sql_based_03.png?inst-v=f1245147-b616-4101-98c2-c12a7cc79779)
In this dialog window you will see an overview of your report.
You can drag ang drop column headers up to the “Drag a column header here to group by that column” to view in groups.
Click on next to continue.
Saving the Report
![](../../../__attachments/3349053562/sql_based_04.png?inst-v=f1245147-b616-4101-98c2-c12a7cc79779)
In this dialog window you can save your report.
You can cancel all progress so far, save the report or save the report with a specific name.
You can also set the report to private and provide a short description for the report.
Click on Finish once you are done.