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

Jasperreports add another report how to deal with pagination


javaoneiut

Recommended Posts

 


i have a invoice i need to add a report as last page in the report a report with multiples images with severals sizes. everything works OK but i am facing the Pagination problem because the first report can have from 1...N pages and the pagination is OK but when i add the other reports by example will appear in Page 3 i can see still.

 

Page 1 from 1.

 

i was wondering if it is possible to relate the numerations in the 2 reports to act good something like

 

First report [3 pages].

 

    Page 1: Page 1 from 3

    Page 2: Page 2 from 3

    Page 3: Page 3 from 3

Second report [1 page].

 

    Page 1: Page 4 from 4

some code.

final ArrayList<JasperPrint>jaspers=new ArrayList<JasperPrint>(Arrays.asList(jasperPrint,imageStreaming));
final ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
final JRExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST,jaspers);
exporter.setParameter(JRPdfExporterParameter.IS_CREATING_BATCH_MODE_BOOKMARKS,true);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,arrayOutputStream);
exporter.exportReport();
arrayOutputStream.close(); [/code]
[/code]
any trick or resource or workaround is hugely appreciate.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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