2004 IR Help Posted August 22, 2006 Share Posted August 22, 2006 By: pierre_dsd - pierrelecointre Jasper With Java studio Creator 2005-07-01 01:04 Hi! I'm working on jsf project with Java Studio creator 2, and I'd like to work with Jasper reports but it doesn't work. Well, here is the problem : I took from sun's forum an example with jsf and JSC and jasper6.1 : http://swforum.sun.com/jive/thread.jspa?threadID=50166&tstart=0 It works fine, but t only works with the provided library 6.1 and with the compiled ".jasper" file. If I change the library (6.8) of jasper, it doesn't work anymore. If I try it with an other compiled ".jasper" file, it doesnt work too. I tried to use the webapp demo to try to compile with my jsc project butit didnt work, how can I make it compile ? So, I tryed to compile the same file with 6.8 jasper version with the webapp running in tomcat, and that worked fine, but with 6.8 on jsc andthis compiled file it doesnt work !! This works fine with the jrxml provided and jasper 6.1 : ******************************** InputStream is=null;//contains the report .jasper file JasperReport jreport=null; byte[] pdf=null; classReportingManager mr = new classReportingManager(); try { is=mr.getReportIS(report,conn); } catch(SQLException e){} //Map parameters = new HashMap(); //SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); //parameters.put("DATE", new String(format.format(dt1))); parameters.put("TESTVAR", new Integer(2)); try { pdf = JasperRunManager.runReportToPdf(is,parameters,conn); } catch (JRException jre){} ****************************** But this dosent work, with same config (6.1) or with 6.8 !!!!!! InputStream is=null;//contains jrxml file <<<<<< JasperReport jreport=null; byte[] pdf=null; classReportingManager mr = new classReportingManager(); try { is=mr.getReportIS(report,conn); } catch(SQLException e){} //Map parameters = new HashMap(); //SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); //parameters.put("DATE", new String(format.format(dt1))); parameters.put("TESTVAR", new Integer(2)); try { jreport= JasperManager.compileReport(is); pdf = JasperManager.runReportToPdf(jreport,parameters,conn); } catch (JRException jre){} So does anyone know what I could do, or has anyone an example of JSC code with jasper 6.8 ???? thanks a lot for your help Pierre By: pierre_dsd - pierrelecointre RE: Jasper With Java studio Creator 2005-07-04 01:32 Has anyone just an example of JSF code that works fine with Jasper ? Because I don't manage to make these JSF and Jasper work fine together. Thnaks a lot Pierre 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