delmarman Posted August 26, 2009 Share Posted August 26, 2009 HELLO I would like some help with a problem that has at generate reports with iReport, you initially installed in NetBeans iReport PLUYING OF, THE WAY TO GENERATE LOCAL REPORTS NO PROBLEM. The problem arises When connected to a database that is hosted on the server of the COMPANY, I DO NOT GENERATE THE REPORT AND SEND ME THE FOLLOWING ERROR: Mensaje de Error:Error executing SQL statement for : report namePLEASE IF ANYONE CAN HELP ME I would be very grateful, IF THE REPORT IS GENERATED, THE PROBLEM IS IN THE CLASS OF JAVA TO pass it a parameter and nothing is displayed Code:import java.sql.*;public class BDConexion{ static String bd = "empresa"; static String login = "root"; static String password = "123"; static String url = "jdbc:mysql://localhost/"+bd; Connection conexion = null; public BDConexion() { try { Class.forName("com.mysql.jdbc.Driver"); conexion = DriverManager.getConnection(url,login,password); if (conexion!=null){ System.out.println("Conexión a base de datos "+bd+" OK"); } }catch(SQLException e){ System.out.println(e); } catch(ClassNotFoundException e){ System.out.println(e); } } public Connection getConexion(){ return conexion; } public void desconectar(){ conexion = null; }} Link to comment Share on other sites More sharing options...
JSquire Posted August 27, 2009 Share Posted August 27, 2009 Try running the query directly against the database (independantly of iReport) - you should be able to do this with most SQL query tools. Hopefully this way you will get a diffferent error message that will pinpoint the issue. 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