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

Multiple Reports into a Single Output page number not getting updated


rishikvr

Recommended Posts

Hi, 

I am trying to merge multiple .jrxml files and hence multiple pdf's each having different data set into a single pdf . I was able to genereate the single pdf which has all the pdf's generated from .jrxml but the page number is not getting update for the whole document. Ex. i have 1 page in each pdf and even though i have three pages each shows as 1 of 1. How do i update the page number reflecting the total number of pages. Here is my code sample. Thanks for your help in advance.

private void exportThePrintList(List<JasperPrint> jasperPrintList, OutputStream output) throws JRException {

        if(!jasperPrintList.isEmpty()) {
            JRPdfExporter jrPdfExporter = new JRPdfExporter();
            jrPdfExporter.setExporterInput(SimpleExporterInput.getInstance(jasperPrintList));
            jrPdfExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(output));
 
            SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration();
            configuration.setCreatingBatchModeBookmarks(true);
            jrPdfExporter.setConfiguration(configuration);
            jrPdfExporter.exportReport();
        }
    }
 
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...