Tuesday 30 April 2013

How to setup JDBC connection in iReport


Jaspersoft, iReport doesn’t have JDBC connector for MySQL  in built. Hence to make JDBC connection to MySql database you have to download the MySql JDBC connector and configure the iReport.

Follow the steps mentioned below to set-up JDBC connection to MySql database:


2. Launch iReport designer.

3. Goto  "Tools --> Options" menu and select iReport Tab in the Options window.

4. Click on Classpath tab and Check if the MySql database driver is already present.

5. Click "Add JAR" and then locate the MySql JDBC Drivers downloaded in Step 1 and Click Ok.

6.Click "Report Datasources" icon  in toolbar.

7. Click "New" and set up a "Database JDBC Connection" using driver from Step 1.

8. Click "Test" to verify the data source works correctly.

9. Click "Save" to save the data source.

You can use this method to add database drivers/connectors for any database. Let me know, if you face any issues with this process.

1 comment:

  1. Great tips, thanks! I followed it step-by-step and everything worked out great, and its very strange for me cause I had found similar articles before, but non of them did not help me with solution of this annoying problem! Now I finally will make my project in time. By the way yesterday I found this service that also can help with database connectivity https://explainjava.com/jdbc/ if you have some troubles, so hope it will be helpful for u.

    ReplyDelete