boomramada Posted August 12, 2010 Share Posted August 12, 2010 Hello,Im new to jasper, just a quick question, do i have to compile and save to file before convert to the pdf.or could able to compile and run on the fly from the jrxml.eg:byte[] cr = JasperCompileManager.compileReportToFile( path + "Report.jrxml").getBytes();ByteArrayInputStream is = new ByteArrayInputStream(cr); JasperRunManager.runReportToPdfStream(is, servletOutputStream, new HashMap(), new JREmptyDataSource()); Is it possible? however, that gives an net.sf.jasperreports.engine.JRException: Error loading object from InputStream Link to comment Share on other sites More sharing options...
lucianc Posted August 14, 2010 Share Posted August 14, 2010 compileReportToFile returns the name of the compiled file.What you can do is to call compileReport to return a JasperReport instance, save it to a file using JRSaver and use it directly in JasperRunManager.HTH,Lucian 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