burferd Posted March 3, 2012 Share Posted March 3, 2012 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 More sharing options...
burferd Posted March 3, 2012 Author Share Posted March 3, 2012 I figured out a work around.I loaded the NetBeans plugin, created a connection in NetBeans and then used the NetBeans connection option.That seems to work, but I still do not know why what I did above fails. Link to comment Share on other sites More sharing options...
phuchoa0502 Posted March 8, 2012 Share Posted March 8, 2012 burferdWrote: 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 More sharing options...
burferd Posted March 8, 2012 Author Share Posted March 8, 2012 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 More sharing options...
phuchoa0502 Posted March 9, 2012 Share Posted March 9, 2012 burferdWrote: 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 More sharing options...
burferd Posted March 9, 2012 Author Share Posted March 9, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now