lbaillehache Posted August 9, 2017 Share Posted August 9, 2017 HelloI 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now