Jump to content
We've recently updated our Privacy Statement, available here ×

How to connect to DB2 databse from ireport 3.7.5


saisree.addagiri
Go to solution Solved by joel.carlson,

Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Not sure if iReport 3.7.5 is the same as 5.6.0 but you need to upload the jar drivers in iReports. Tools - Options, Then under classpath tab upload the db2jcc.jar and the db2jcc_license_cu.jar. For you database connection click the button for a new connection and type a name for it, then type in com.ibm.db2.jcc.DB2Driver in JDBC Driver, for JDBC URL use jdbc:db2://{IP or hostname of server}:50000/{Database name} then enter your username and password and hit test. Should work.You should be able to find the jar files under {installation directory}/IBM/SQLLIB/java

Link to comment
Share on other sites

Hi Joel,

I tried as it is like you said in previous also. But still iam unable to connect to DB2 database. I got error like COM.ibm.db2.jdbc.app.DB2Driver class not found. I have added db2jcc.jar and db2jcc_license_cu.jar and db2java.jar files in ireport classpath(tools--->classpath).

I have also added db2java.jar file in ireport services under(Window menu) it is loading this class COM.ibm.db2.jdbc.app.DB2Driver.

But ireport was unable to load this class.

Link to comment
Share on other sites

Hi

I have connected db2 database in services window. There it is loadinf all the tables and views, procedures in that database. However i am unable to get those tables in ireport. If i write any query with those tables it is giving error like table not found.

Please let me know the procedure for connecting db2 from ireport and from there reading data from that connection.

Its urgent.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...