Problems with JasperReport

0

I'm using netbeans 8.2

And this is the code that I occupy

and mark the following errors

These are the libraries

Can someone help me?

    
asked by JUAN GERARDO HERNANDEZ NARVAEZ 24.11.2018 в 23:04
source

1 answer

0

Old man, I'm also using JasperReport and I also had that error.

First if you use a connection to bd, open your connection there:

JasperReport reporte = null;
//Cambias el String path por un URL Path
URL path = this.get().getResources("/nombreDeTuPaquete/NombreReporte.jasper);

try{
reporte = (JasperReport) JRLoader.loadObject(path);
JasperPrint jprint = JasperFillManager.fillReport(reporte, null, variableDeTuConexion);

JasperrViewer view = new JasperViewer(jprint,false);
view.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
view.setVisible(true);

}catch(JRException ex){}
    
answered by 25.11.2018 в 01:21