1- Open Jaspersoft iReport Designer and click on "Report Datasource" icon.
2- Connections/ Datasource dialog box will open. From this click on "New" button.
3- Another dialog box will open from here select first option "Database JDBC Connection" and click "Next".
4- Now add your credentials for "Database JDBC Connection".
- Name -- your data source name
- JDBC Driver -- select "PostgreSQL (org.postgresql.Driver)" in case of PostgreSQL
- JDBC URL -- jdbc:postgresql://localhost:your_port_number/DatabaseName
- Username -- database user
- Password -- user password
After adding above credentials click on "Test" button to check your connection success/failed status and than click on "Save" button to finish your data source connection.