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

Error generating a report of a BD hosted on a serv


delmarman

Recommended Posts

 

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 name
PLEASE 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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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