/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/XYChart.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
public void export(HttpServletRequest req, HttpServletResponse res) throws Exception { String fileName=this.getExportFileName(req); fileName+=".xls"; res.setContentType("application/octet-stream"); res.setHeader("Connection", "close"); res.setHeader("Content-Disposition", "attachment;filename=\"" + new String(fileName.getBytes("utf-8"),"ISO-8859-1") + "\""); JRXlsExporter exporter = new JRXlsExporter(DefaultJasperReportsContext.getInstance()); JasperPrint jasperPrint=this.getJasperPrint(req); exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint); OutputStream ouputStream = res.getOutputStream(); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, ouputStream); try { exporter.exportReport(); } catch (JRException e) { throw new ServletException(e); } finally { if (ouputStream != null) { ouputStream.flush(); ouputStream.close(); } } }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/Barcode4JReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/JFreeChartReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * Generates an XLS report from a pre-compiled report and returns it into a file. * * @param jasperPrint * JasperPrint object which contains a compiled report. * @param exportParameters * Export parameters than can be added to configure the resulting report. * @param file * The file used to return the report. * @throws JRException * In case there is any error generating the report an exception is thrown with the * error message. */ private static void saveExcelReportToFile(JasperPrint jasperPrint, Map<Object, Object> exportParameters, File file) throws JRException { final JRXlsExporter excelExporter = new JRXlsExporter(); SimpleExporterInput exporterInput = new SimpleExporterInput(jasperPrint); SimpleOutputStreamExporterOutput exporterOutput = new SimpleOutputStreamExporterOutput(file); if (exportParameters != null && exportParameters.size() > 0) { SimpleXlsReportConfiguration exportConfiguration = getXlsConfigurationFromExportParameters(exportParameters); excelExporter.setConfiguration(exportConfiguration); } else { SimpleXlsReportConfiguration reportExportConfiguration = new SimpleXlsReportConfiguration(); reportExportConfiguration.setOnePagePerSheet(false); reportExportConfiguration.setRemoveEmptySpaceBetweenRows(true); excelExporter.setConfiguration(reportExportConfiguration); } excelExporter.setExporterInput(exporterInput); excelExporter.setExporterOutput(exporterOutput); excelExporter.exportReport(); }
/** * Generates an XLS report from a pre-compiled report and returns it into an output stream. * * @param jasperPrint * JasperPrint object which contains a compiled report. * @param exportParameters * Export parameters than can be added to configure the resulting report. * @param outputStream * The output stream used to return the report. * @throws JRException * In case there is any error generating the report an exception is thrown with the * error message. */ private static void saveExcelReportToOutputStream(JasperPrint jasperPrint, Map<Object, Object> exportParameters, OutputStream outputStream) throws JRException { final JRXlsExporter excelExporter = new JRXlsExporter(); SimpleExporterInput exporterInput = new SimpleExporterInput(jasperPrint); SimpleOutputStreamExporterOutput exporterOutput = new SimpleOutputStreamExporterOutput( outputStream); if (exportParameters != null && exportParameters.size() > 0) { SimpleXlsReportConfiguration exportConfiguration = getXlsConfigurationFromExportParameters(exportParameters); excelExporter.setConfiguration(exportConfiguration); } else { SimpleXlsReportConfiguration reportExportConfiguration = new SimpleXlsReportConfiguration(); reportExportConfiguration.setOnePagePerSheet(false); reportExportConfiguration.setRemoveEmptySpaceBetweenRows(true); excelExporter.setConfiguration(reportExportConfiguration); } excelExporter.setExporterInput(exporterInput); excelExporter.setExporterOutput(exporterOutput); excelExporter.exportReport(); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/UnicodeReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/DataSourceReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/FontsReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/FormsReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/StyledTextReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/MapReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/TabularReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/QueryReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/ShapesReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/CustomersReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/MasterReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/NoXmlDesignReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { File[] files = getFiles(new File("build/reports"), "jrprint"); for(int i = 0; i < files.length; i++) { long start = System.currentTimeMillis(); File sourceFile = files[i]; JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("Report : " + sourceFile + ". XLS creation time : " + (System.currentTimeMillis() - start)); } }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/NoPageBreakReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); configuration.setRemoveEmptySpaceBetweenRows(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/XlsDataSourceReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/HorizontalReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/HyperlinkReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/MarkupReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/StylesReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/ImagesReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/JsonCustomersReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/AllChartsReport.jrprint"); Map<String, String> dateFormats = new HashMap<String, String>(); dateFormats.put("EEE, MMM d, yyyy", "ddd, mmm d, yyyy"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); configuration.setDetectCellType(true); configuration.setFormatPatternsMap(dateFormats); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/BarbecueReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/XChartReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/IconLabelReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/StretchReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); configuration.setFontSizeFixEnabled(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/SpiderChart.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/ParagraphsReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/TableReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/NoReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/TableOfContentsReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(true); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }
/** * */ public void xls() throws JRException { long start = System.currentTimeMillis(); File sourceFile = new File("build/reports/RotationReport.jrprint"); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(destFile)); SimpleXlsReportConfiguration configuration = new SimpleXlsReportConfiguration(); configuration.setOnePagePerSheet(false); exporter.setConfiguration(configuration); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); }