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

No puedo abrir un reporte echo con jasper report 5.6.0 con netbeans ayudaaaa


tone02323

Recommended Posts

Les cuento el panorama , estoy usando neetbeans 8.2  con jdk 1.8 y jasper report 5.6.0 con una base de datos de access conectada atrabes de del Driver ucanaccess 5.0

Ya he utilizado jasper reports sin ningun problema , el tema es que tuve que actualizar el jdk para poder utilizar el driver de ucanaccess 5.0, baje la ultima vercion del jasper reports que parese en el neetbeans importe las libreriras al proyecto todo como lo he echo anteriormente pero se me ha echo imposible poder hacer que levante el reporte desde neetbeans. Creo que el probelmas es que estas libreriras andan con jdk 1.7 prove de todo pero no salgo de este atasco.

Les muestro que es lo que tengo y donde es que el programa no ejecuta ya que nome da ningun error pero no lebanta el reporte.

las libreriras importadas son las siguiente:

commons-beanutils-1.8.2.jar

commons-collections-3.2.1.jar

commons-digester-2.1.jar

commons-javaflow-20060411.jar

commons-logging-1.1.jar

groovy-all-2.0.1.jar

hsqldb-1.8.0-10.jar

iText-2.1.7.js2.jar

jasperreports-5.6.0.jar

public class ReporteCarrerasCategoria {
      public void mostrarReporte(int cam,int cat, int fech,int ordenado){
  
        try{
                                                                                                 
            
            JasperReport reporte = JasperCompileManager.compileReport(System.getProperty("user.dir").concat("\src\Reporte\RpCarrerasCategoria.jrxml"));
          
            DatasourceCarrerasCategoria ds=new DatasourceCarrerasCategoria();
            ManejadoraCarreras.getInstance().cargarDataSourceCarrerasCategoria(ds.getListaCarreraCategoria(),cam,cat,fech,ordenado);
           
            String dirImagen = System.getProperty("user.dir").concat("\src\Iconos\motoIcon.png");
            Map parametros = new HashMap();
            parametros.clear();
//            parametros.put("motoIcon",dirImagen);
//            parametros.put("campiopnato",cam);
//            parametros.put("categoria",cat);
//             parametros.put("fecha",fech);
//             parametros.put("orden",ordenado);
            

//este es lo que no me funciona JasperPrint 
           JasperPrint p=JasperFillManager.fillReport(reporte, parametros, ds);         
                          
            JasperViewer view = new JasperViewer(p, false);
            view.setTitle("Carreras por Categoria ");
            view.setExtendedState(Frame.MAXIMIZED_BOTH);
            view.setVisible(true);
        } catch (Exception e){
            
        }
    }
}
 

JasperPrint este es el que no lo esta ejecutando y por eso nome uestra el reporte, ya lo corri en modo debug y los parametros les llegan correctamente con datos pero pienso yo que el jdk1.8 no lo deja correr.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Translation:

I tell you the panorama, I am using neetbeans 8.2 with jdk 1.8 and jasper report 5.6.0 with an access database connected through Driver ucanaccess 5.0

I have already used jasper reports without any problem, the issue is that I had to update the jdk to be able to use the ucanaccess 5.0 driver, download the last version of the jasper reports that stops in the neetbeans import the libraries to the project everything as I have done previously but it has become impossible for me to make it raise the report from neetbeans. I think the problem is that these libraries work with jdk 1.7 provides everything but I do not get out of this jam.

I show you what I have and where is that the program does not run since it does not give me any errors but it does not raise the report.

 

......

JasperPrint this is the one that is not running it and that is why it does not show us the report, I already ran it in debug mode and the parameters arrive correctly with data but I think that jdk1.8 does not let it run.

 

Link to comment
Share on other sites

  • 5 months later...

ConectorJ cj = new ConectorJ();
        String reportPath = "src/main/java/Reports/persons.jasper";
        try (Connection connection = cj.gConnection()) {
            InputStream inputStream = JRLoader.getFileInputStream(reportPath);
            JasperPrint jPrint = JasperFillManager.fillReport(inputStream, null, connection);
            JasperViewer jViewer = new JasperViewer(jPrint, false);
            jViewer.setTitle("Personas registradas");
            jViewer.setExtendedState(Frame.MAXIMIZED_BOTH);
            jViewer.setVisible(true);
        } catch (Exception e) {
            System.err.println(e.getMessage());
        }

 

try this

Link to comment
Share on other sites

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