reportExportConfiguration.setIgnoreHyperlink(jasperExporter.getIgnoreHyperLink()); SimpleHtmlExporterConfiguration exporterConfiguration = new SimpleHtmlExporterConfiguration(); if (jasperExporter.getHtmlHeader() != null) { exporterConfiguration.setHtmlHeader(jasperExporter.getHtmlHeader()); exporterConfiguration.setBetweenPagesHtml(jasperExporter.getBetweenPagesHtml()); exporterConfiguration.setHtmlFooter(jasperExporter.getHtmlFooter()); exporterConfiguration.setFlushOutput(jasperExporter.getFlushOutput());
public static void exportReportHtml(JasperPrint jp, String path) throws JRException, FileNotFoundException { HtmlExporter exporter = new HtmlExporter(); File outputFile = new File(path); File parentFile = outputFile.getParentFile(); if (parentFile != null) parentFile.mkdirs(); FileOutputStream fos = new FileOutputStream(outputFile); SimpleExporterInput simpleExporterInput = new SimpleExporterInput(jp); SimpleHtmlExporterOutput simpleOutputStreamExporterOutput = new SimpleHtmlExporterOutput(fos); exporter.setExporterInput(simpleExporterInput); exporter.setExporterOutput(simpleOutputStreamExporterOutput); SimpleHtmlExporterConfiguration configuration = new SimpleHtmlExporterConfiguration(); exporter.setConfiguration(configuration); exporter.exportReport(); logger.debug("HTML Report exported: " + path); }
exporter = new HtmlExporter(); exporter.setExporterOutput(new SimpleHtmlExporterOutput(outputStream)); exporter.setConfiguration(new SimpleHtmlExporterConfiguration()); } else if (ReportOutputType.csv == outputType){ exporter = new JRCsvExporter();
exporter = new HtmlExporter(); exporter.setExporterOutput(new SimpleHtmlExporterOutput(outputStream)); exporter.setConfiguration(new SimpleHtmlExporterConfiguration()); } else if (ReportOutputType.csv == outputType){ exporter = new JRCsvExporter();