I generate this error in a specific report in the others no .. and I do not understand why ... this is my procedure to call the report, that only happens when I run the application, because in the netbeans with the ireport plugin if the report generates me
public void reporteproce(int idprocedimientos)
{
try
{
ConexionBD cc = new ConexionBD();
Connection conect = cc.conexion();
//System.out.println(idprocedimiento);
JasperReport reporte=(JasperReport) JRLoader.loadObject("ReporteBronc.jasper");
Map parametro = new HashMap();
parametro.put("idprocedimiento",idprocedimientos);
JasperPrint j = JasperFillManager.fillReport(reporte, parametro,conect);
JasperViewer jv =new JasperViewer(j,false);
jv.setTitle("Broncocospia Respiratoria");
jv.setVisible(true);
}catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error al Mostrar Reporte "+e);
}
}
..... this is the code of the button
private void BReporteActionPerformed(java.awt.event.ActionEvent evt) {
//SI SE HA ECHO CLIC EN EL JTABLE PACIENTES SELECCIONANDO UN REGISTRO
int i=jTablePacientes.getSelectedRow();
if(i==-1)
{
JOptionPane.showMessageDialog(jTablePacientes,"Porfavor Elija Un Registro");
}else
{
GenerarReporte reportito = new GenerarReporte();
//***********BUSCANDO SI EL PACIENTE TIENE ALGUNA ATENCION****************************
try{
ConexionBD conectar = new ConexionBD();
Connection cn = conectar.conexion();
sent = cn.createStatement();
int x=Integer.parseInt(TxtConsulta.getText());
//System.out.println(x);
reportito.reporteproce(x);
resultado.close();
sent.close();
}catch(Exception e)
{
System.err.println(""+e.getMessage());
}
}
and so I get in the netbeans .. but already in the application I get that error
Please give me a hand that I'm stuck with