Wednesday, November 21, 2012

Connect ireport with MS-SQL Server

Note:- Download Ms-Sql Jdbc Jar from Here.
Steps to set the MS-SQL Driver in Classpath for iReport:
i) Go to "Tools / Options" menu and select iReport.
ii) Verify that database JDBC driver is present:
- Choose "Classpath" tab
- Click "Add JAR" and then locate the mysql.jdbc.Driver which you already downloaded.
- Click "OK"
iii) click "Connections / Datasources" icon in toolbar.
iv) click "New" and set up a "Database JDBC Connection" using driver from step 2
v) click "Test" to verify the data source works correctly.
vi) click "Save" to save the data source.


How to resolve the Version issue with ireports .
When i was trying to run ireports i was getting this issue ...

As i have Java1.5 and Java1.6 both installed in my machine and in Environment variable i setup JAVA_HOME for Java1.6 but still i was getting above issue.
1-Firstly i deleted directory
.jasper
which was present here
C:\Users\username
because these file pointing to java1.5. After that i editedireport.conf which is present in this directory
C:\Java\iReport-4.8.0\etc.
.
Uncomment this entry
jdkhome
and give your installed JDK path.
Save your changes and restart ireport.

No comments:

Post a Comment