2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: Badiane - abadiane iReport 1.2.4 JasperRunManager problem 2006-07-13 16:38 Hello, I have the following code that work perfectly with ireport 0.5.2 libraries. But when I switch to iReport 1.2.4, it does not work. Iam using JBuilder 9 with jdk 1.4.2. Need help. protected boolean impEtat(Connection cnn, Vector v){ boolean impOK=false; File jasperFile; File pdfFile=null; Map parametres; String nomEtat=null; String nomEtatPdf=null; String idEtatPdf=null; int i=0; try{ nomEtat=(String)v.get(0); jasperFile = new File(this.getServletConfig().getServletContext().getRealPath("/report/" + nomEtat)); parametres = (HashMap)v.get(1); nomEtatPdf=(nomEtat.split("[.]"))[0] + idEtatPdf + ".pdf"; pdfFile = new File(this.getServletConfig().getServletContext().getRealPath("/report/" + nomEtatPdf)); //Générer l'état JasperRunManager.runReportToPdfFile(jasperFile.getPath(),pdfFile.getPath(), parametres, cnn); return true; } catch(Exception esql){ log.log(esql.toString(),LogWriter.ERROR); esql.printStackTrace(); return false; } } 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