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

Problem creating SQL Server connection in iReport 4.5.0


burferd

Recommended Posts

I just downloaded the latest version of Jasper Reports and iReport and am attempting to create a new database connection to my SQL Server database.

I am using this driver:  sqljdbc4.jar  and added the driver to the Databases->Drivers section in the Services window.

I then attempted to create a new database connection using the connection information that works in my application.  In the New Connection dialog, I tried both the Field Entry and Direct URL Entry methods.  In both cases, when I fill out the connection information and push OK, the dialog greys out with only the Cancel and Help buttons active. 

I suspect it is attempting to create the connection, but apparently never does.

The database is active and I can connect to it with both my application and the SWL Server Management Studio using the information I entered for the connection in iReport.

Is there a problem with creating SQL Server database connections in iReport 4.5.0?

Any suggestions on how I can create the database connection?

Should I back off to an older version of iReport?

Thanks

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

burferd
Wrote:

I just downloaded the latest version of Jasper Reports and iReport and am attempting to create a new database connection to my SQL Server database.

I am using this driver:  sqljdbc4.jar  and added the driver to the Databases->Drivers section in the Services window.

I then attempted to create a new database connection using the connection information that works in my application.  In the New Connection dialog, I tried both the Field Entry and Direct URL Entry methods.  In both cases, when I fill out the connection information and push OK, the dialog greys out with only the Cancel and Help buttons active. 

I suspect it is attempting to create the connection, but apparently never does.

The database is active and I can connect to it with both my application and the SWL Server Management Studio using the information I entered for the connection in iReport.

Is there a problem with creating SQL Server database connections in iReport 4.5.0?

Any suggestions on how I can create the database connection?

Should I back off to an older version of iReport?

Thanks

 

 

i think you were not add the jar file in to classpath of ireport, right?

should add it. or you can try use jtds-1.2.5.jar for SQL server connection.

Link to comment
Share on other sites

In the Services window, I added the driver in the Databases -> Drivers section.

Does that not add the library to the classpath?

If not, then how do I add it?

I did this to add an Oracle driver and that allowed me to make a connection in iReport, but not the SQL Server driver.

I'm not familiar with the jtds-1.2.5.jar file you mention.  I wold prefer to use the same drivers that I use for my application, however.

Link to comment
Share on other sites

burferd
Wrote:

In the Services window, I added the driver in the Databases -> Drivers section.

Does that not add the library to the classpath?

If not, then how do I add it?

I did this to add an Oracle driver and that allowed me to make a connection in iReport, but not the SQL Server driver.

I'm not familiar with the jtds-1.2.5.jar file you mention.  I wold prefer to use the same drivers that I use for my application, however.

 

 

Pls adv me some info:

- what languagues you use for programming?

- i don't understand  this: "I added the driver in the Databases -> Drivers section"

where is it?

- you want to make connection in ireport or what?

 



Post Edited by phuchoa0502 at 03/09/2012 09:27
Link to comment
Share on other sites

I am programming in Java.

To create the connection, I opened the "Services" window by clicking on the "Window" option in the iReport main menu bar and selecting "Services".  This displayed the "Services" window on the left side of iReport.  In the "Services" window, I expanded the "Database" tree by clicking on the "Database" icon.  In this tree, I did a Left click on the "Drivers" icon and selected the "New Driver" option from the popup menu.  That displayed a "New JDBC Driver" dialog box.  In that box, I clicked the "Add" button and navigated to where my SQL Server driver jar file is located.  I selected that driver and clicked the "OK" button.  That added the driver I just selected to the list of Drivers in the Services window.  I then left clicked on the "Database" icon in the Services Window and selected the "New Connection" option.  This brought up the "New Connection" dialog.  I entered the Username, Password, and JDBC URL that is used in the application.  I clicked OK, and iReport attempted to make the connection, but never could.

I did these same steps for my Oracle driver and it worked just fine.

I know the SQLServer driver, username, password, and JDBC URL are correct, because I can make the database connection in NetBeans and in my application.

I want the connection in order to create a Jasper Report that I can call from my Java web application using the data in the database for information on the report. 

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