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

compile and create pdf on fly


boomramada

Recommended Posts

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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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