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

How to combine 5 reports to be a single pdf report


ruyi

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

 

If your reports have the same structure, then you can use multiple detail bands. If not, then you can use jasperreports in order to compose an array of JasperPrint objets (one per report) and exporting the array to PDF.

 

Hope this help

Ana Rosa

Link to comment
Share on other sites

Thank you so much Ana Rosa for your suggestion.

I am the new user of iReport so don't mind me .

Would you like to share me your knowledge about how to do the second option in iReport(compose an array of jasperprint and exporting the array to PDF)?

 

Thanks and Regards,

Ruyi

 

Link to comment
Share on other sites

ruyi
Wrote:

Thank you so much Ana Rosa for your suggestion. I am the new user of iReport so don't mind me . Would you like to share me your knowledge about how to do the second option in iReport(compose an array of jasperprint and exporting the array to PDF)? Thanks and Regards, Ruyi
Suppose that the "String[] jaspers" variable contains the path of the files ".jasper". The code is something like:
Code:
JasperPrint[] jasperPrint = new JasperPrint[jaspers.length];for (int i=0; i<jaspers.length; i++) {   JRDataSource ds = //code for ds creation.    Map jasperParams = //include report parameters   jasperPrint[i] = JasperFillManager.fillReport(jaspers[i],jasperParams, ds)}JRAbstractExporter exporter = //code for export creationexporter.setParameter(... //code for exporter parametersexporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrint);exporter.exportReport();
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...