This article is related to jasper reports, before creating reports in jasper using ireport designer we need to add report datasource. It means that from which source report data comes. I will show you how to add report data source in ireport designer step by step.
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.