Search in sources :

Example 1 with HtmlExporter

use of net.sf.jasperreports.engine.export.HtmlExporter in project tutorials by eugenp.

the class SimpleReportExporter method exportToHtml.

public void exportToHtml(String fileName) {
    HtmlExporter exporter = new HtmlExporter();
    exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
    exporter.setExporterOutput(new SimpleHtmlExporterOutput(fileName));
    try {
        exporter.exportReport();
    } catch (JRException ex) {
        Logger.getLogger(SimpleReportFiller.class.getName()).log(Level.SEVERE, null, ex);
    }
}
Also used : SimpleHtmlExporterOutput(net.sf.jasperreports.export.SimpleHtmlExporterOutput) HtmlExporter(net.sf.jasperreports.engine.export.HtmlExporter) JRException(net.sf.jasperreports.engine.JRException) SimpleExporterInput(net.sf.jasperreports.export.SimpleExporterInput)

Aggregations

JRException (net.sf.jasperreports.engine.JRException)1 HtmlExporter (net.sf.jasperreports.engine.export.HtmlExporter)1 SimpleExporterInput (net.sf.jasperreports.export.SimpleExporterInput)1 SimpleHtmlExporterOutput (net.sf.jasperreports.export.SimpleHtmlExporterOutput)1