Export JasperReport to HTML

Contents
[ ]

The following code snippet demonstrates how to export the JasperReport to HTML.

Java

ASHtml5CanvasExporter html5CanvasExporter = new ASHtml5CanvasExporter();
ASHtmlExportConfigurationImpl htmlExportConfiguration = new ASHtmlExportConfigurationImpl();
htmlExportConfiguration.setCanvasTagId("SomeId");
htmlExportConfiguration.setFullHtmlPage(true);
htmlExportConfiguration.setEncoding(StandardCharsets.UTF_8);

html5CanvasExporter.setConfiguration(htmlExportConfiguration);

ASExportInputImpl exporterInput = new ASExportInputImpl(jasperPrint);
html5CanvasExporter.setExporterInput(exporterInput);

ASExporterOutputImpl exporterOutput = new ASExporterOutputImpl("shapesExample.html");
html5CanvasExporter.setExporterOutput(exporterOutput);

html5CanvasExporter.exportReport();