tone02323 Posted June 3, 2020 Share Posted June 3, 2020 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.0Ya 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.jarcommons-collections-3.2.1.jarcommons-digester-2.1.jarcommons-javaflow-20060411.jarcommons-logging-1.1.jargroovy-all-2.0.1.jarhsqldb-1.8.0-10.jariText-2.1.7.js2.jarjasperreports-5.6.0.jarpublic 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 More sharing options...
djohnson53 Posted June 3, 2020 Share Posted June 3, 2020 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.0I 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 More sharing options...
danibaufu Posted November 14, 2020 Share Posted November 14, 2020 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 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