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

Ireports and MS sql server


lgarcia

Recommended Posts

Hi there

 

I am new to Ireports so my question may be naïve, please forgive me.

 

I have tried to connect from ireports to a ms sql server on my laptop but I get an error message -

 

ClassNotFoundErro:

com.microsoft.jdbc.sqlserver.SQLServerDriver

 

Check your classpath!

 

I have downloaded microsoft's jdbc driver and installed it I have also point my classpath to this directory but I still having problems.

 

Could somebody help me and I am trying to evaluate this product.:)

 

Thanks

 

Luis Garcia

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Hi lgarcia

I have recently configured on my laptop connection to sqlserver2005 for iReport through 2 approaches

1: using JDBC odbc bridge

2: using JTDS driver from sourceforge

 

FOR OPTION 1

 

I made a connection in SYSTEM DSN to the server using the "Control PAnel < ODBC data source". You must be knowing this

 

and in iReport Database connections properties do followign

driver---sun.jdbc.odbc.JdbcOdbcDriver

enter ur server address and database name, user, pwd as applicable to which u want to connect.

and then clikk wizard button of the dialog

URI should be like --- jdbc:odbc:[sYSTEM_ODBC_NAME]

 

 

 

FOR OPTION 2

download the JTDS driver from sourceforge

place its jar file jtds-1.2.jar to lib of iReport

extract 2 .dll files within downloaded zip file into the root of iReport

and then restart the iReport

Select driver --- net.sourceforge.jtds.jdbc.Driver

enter ur server address and database name, user, pwd as applicable to which u want to connect.

and then clikk wizard button of the dialog

 

URI should look like --- jdbc:jtds:sqlserver://[server naem]/Data;instance=

 

 

Hope this helps

Link to comment
Share on other sites

Hi lgarcia

I have recently configured on my laptop connection to sqlserver2005 for iReport through 2 approaches

1: using JDBC odbc bridge

2: using JTDS driver from sourceforge

 

FOR OPTION 1

 

I made a connection in SYSTEM DSN to the server using the "Control PAnel < ODBC data source". You must be knowing this

 

and in iReport Database connections properties do followign

driver---sun.jdbc.odbc.JdbcOdbcDriver

enter ur server address and database name, user, pwd as applicable to which u want to connect.

and then clikk wizard button of the dialog

URI should be like --- jdbc:odbc:[sYSTEM_ODBC_NAME]

 

 

 

FOR OPTION 2

download the JTDS driver from sourceforge

place its jar file jtds-1.2.jar to lib of iReport

extract 2 .dll files within downloaded zip file into the root of iReport

and then restart the iReport

Select driver --- net.sourceforge.jtds.jdbc.Driver

enter ur server address and database name, user, pwd as applicable to which u want to connect.

and then clikk wizard button of the dialog

 

URI should look like --- jdbc:jtds:sqlserver://[server naem]/Data;instance=

 

 

Hope this helps

Link to comment
Share on other sites

Thank you very much I have tried option 2 and worked fine.:woohoo:

 

I am evaluating iReports and the database that I am interogating is very big and I found that iReports it is very slow exporting the query onto excel. Is there a way to speed the output?

 

Regards

 

Luis

Link to comment
Share on other sites

  • 11 months later...
  • 2 weeks later...

Hi,

 

If you get Exception like ClassNotFoundErro:

com.microsoft.jdbc.sqlserver.SQLServerDriver

 

Hopefully you are missing 3 jar files.

 

1. Msbase.jar

 

2. Msutil.jar

 

3. Mssqlserver.jar

 

make sure you have all these 3 jar files in Lib folder.

or set the class path to this jar files location.

 

 

Nishad

Link to comment
Share on other sites

  • 3 years later...

I hope someone can help me.  I am assigned to evaluate iReports and have downloaded and installed the program.  I want to use my existing odbc connections to Sybase ASE 15, so I downloaded and installed the jdbc-odbc bridge.  But when I try to connect using it, I do not see the driver file. 

I have no Java expertise.  I've seen on the forum to have teh file in the lib directory, but I have about a dozen lib directories in various places on my computer (Windows XP)  and have no idea which is the correct one.

I was able to connect to database included in the installation.

Link to comment
Share on other sites

  • 8 months later...

Hi Everybody,

 

i am using Ireport with SQL SERVER 2005..

i have configured the Datasaset and it is connected succussefully, The problem is when i go to create query i cant find my Database Tables, just few Database system Tables,

i couldnt find a solution for this problem,

kindly refer to the screenshots and advice what i must do to fix it, as i need it very urgently to finish my project.

 

Thanks in Advance



Post Edited by biboovan at 01/21/2012 13:11
Link to comment
Share on other sites

  • 5 weeks later...
Don't worry about .dll file. It's not required. Put jtds-1.2.jar file under libs directory of ireport (e.g. in my machine it is 'C:\Program Files (x86)\Jaspersoft\iReport-4.5.0\ireport\libs'). 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 as valid.
Link to comment
Share on other sites

  • 2 years later...

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...