iReport – Jaspersoft iReport and MS SQL

iReport — Jeff Eske on July 27, 2011 at 8:53 am

I’m in the process of creating reports for FrontRange ITSM, here at work.  To this point, I’ve been developing charts with PHP/GD.  I found a very good PHP charting class out there ( ) but am going to try something more suited to reports.  I’m giving Jaspersoft iReport a try.   One problem – by default, iReport doesn’t ship with a driver that allows me to connect to the Microsoft SQL (MS SQL) server that I need to connect to.  In addition, the documentation that I could find sucked.

It actually turned out to be pretty simple to add support for MS SQL.  I went out to the JTDS site ( and downloaded the zip file with the necessary jar file in it.  I then copied jtds-xxx.jar in the the libs folder in iReport.  On my Windows machine, that folder was C:\Program Files\Jaspersoft\iReport-4.0.2\ireport\libs.  On my linux machine, I left the iReport folder in my home folder, so the location was /home/my_home_folder/iReport/ireport/libs.  At that point, I had the jar file in the right place, but iReport didn’t know about it.  Once you’ve copied the jar file to the correct place, you need to start iReport and go to Tools > Options > iReport > Classpath and click on “Add JAR”.  Navigate to the jar file that you just added and click “Open”.  OK out of all of that and restart iReport.  At that point, when you go in to add a connection, that driver should show up.

UPDATE 10/24/2012 – You’ll need to be careful when upgrading iReport also.

Jeff Eske

1 Comment

  1. […]  I have a few extra .jar files that I’ve added, to enable access to various databases.  I covered how to get the jtdc jar file added to the classpath in a previous post.  I wanted to see how […]

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Jeff's Blog