Jump to content
Changes to the Jaspersoft community edition download ×

Several invoices in the same pdf


lbaillehache

Recommended Posts

Hello
I use a JRDataSource, to print an invoice in a state no problem, but I want to print several invoices in the same state, my JRDataSource contains the list of different beans to be sent to the jrxml, but no way to print invoices In the same pdf.
If someone has an idea, an answer?
Thank you.

this is my Java code :

     // Compilation du fichier jrxml
        JasperReport jasperReport = JasperCompileManager.compileReport(inputFile);

        // Recuperation de la datasource
        JRDataSource beanCollectionDataSource = new JRBeanCollectionDataSource(jasperRessource);

        JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, beanCollectionDataSource);

        // Exporteur du format pdf
        JRPdfExporter exporter = new JRPdfExporter();

        exporter.setExporterInput(new SimpleExporterInput(jasperPrint));

        // On fixe la source de sortie du pdf.
        exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(pOutputStream));
        SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration();
        exporter.setConfiguration(configuration);
        exporter.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

Popular Days

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