gourav.garg Posted April 15, 2014 Share Posted April 15, 2014 Hello Team, I am using iReport for java Printing . Evertything is working perfectly. I have one complex requirment , I need to print same report print multiple times with a report tag name change. Everythign is dynamic and working perfectly. Please suggest what I need to do . For references I am enclosing a report . Please check out E.g I need to write Office Copy instead of Original Copy in Second Copy. I want to Show both Copies same in same time. Regards, Gourav Garg Link to comment Share on other sites More sharing options...
rsuddhala Posted April 16, 2014 Share Posted April 16, 2014 Hi,You can do with the help of subreports.I mean in one report say name as orginal and in another report say name as copy,Include subreports in main report.Thanks,Raviraj Link to comment Share on other sites More sharing options...
ranaraghunath Posted November 6, 2014 Share Posted November 6, 2014 Make multiple jrxml with different heading.just change copy1,copy2 in each report.And add each report to one list and generate single pdf report.Problem solved.My code:JasperDesign jd1=JRXmlLoader.load(request.getRealPath("/jasper") + "/DispatchNote.jrxml"); JasperReport jreport1 = JasperCompileManager.compileReport(jd1); JasperPrint jprint1 = JasperFillManager.fillReport(jreport1, parameters11, new dbConnection().getConnection()); JasperDesign jd2=JRXmlLoader.load(request.getRealPath("/jasper") + "/DispatchNote.jrxml"); JasperReport jreport2 = JasperCompileManager.compileReport(jd2); JasperPrint jprint2 = JasperFillManager.fillReport(jreport2, parameters1, new dbConnection().getConnection()); jprintlist.add(jprint1); jprintlist.add(jprint2);JRPdfExporter pdfExporter=new JRPdfExporter(); pdfExporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST,jprintlist); FileOutputStream output = new FileOutputStream(new File(request.getRealPath("/jasper") + "/silent_print"+".pdf")); pdfExporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM, output); pdfExporter.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