ruyi Posted August 21, 2009 Share Posted August 21, 2009 Hi all,I have few amount of reports . I want to combine these reports to be a single pdf report. I am using iReport 3.5.2 version.Please give me a suggestion . Thanks and Regards,Ruyi Link to comment Share on other sites More sharing options...
anarosa Posted August 21, 2009 Share Posted August 21, 2009 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 More sharing options...
ruyi Posted August 21, 2009 Author Share Posted August 21, 2009 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 More sharing options...
anarosa Posted August 21, 2009 Share Posted August 21, 2009 ruyiWrote: 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 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