sj_so Posted March 3, 2015 Share Posted March 3, 2015 Hello.. I'd like to know how to print a report with default print.customers want to print a document with default print automatically.are there any soultions to satisfy them.. current iReport version is 4.5JasperPrint print = null;Map map = new HashMap();for(int i=0; arrKeyValue.length>i; i++){ map.put(arrKeyName ,arrKeyValue); logger.logInfo("arrKeyName => " + arrKeyName);logger.logInfo("arrKeyValue => " + arrKeyValue); } print = JasperFillManager.fillReport(reportFilePath, map,con);jasperPrintList.add(print); JRPdfExporter exporter = new JRPdfExporter();exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrintList);exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream());exporter.setParameter(JRPdfExporterParameter.IS_CREATING_BATCH_MODE_BOOKMARKS, Boolean.TRUE); 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