Jump to content
Changes to the Jaspersoft community edition download ×

exporting jasper to pdf,excel(urgent)


Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You have to create a list of JasperPrint object :


List jasperPrintList = null;

JasperPrint jasperPrint = JasperFillManager.fillReport(inputStream, jrParameters, jrDataSource);




and to export, just set an exporter parameter like this :


// Generate the global report.

final JRPdfExporter exporter = new JRPdfExporter();

exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrintList);

exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);

exporter.setParameter(JRPdfExporterParameter.IS_CREATING_BATCH_MODE_BOOKMARKS, Boolean.TRUE);


Link to comment
Share on other sites

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