Експортиране на JasperReport в SVG

Contents
[ ]

Следният кодов фрагмент демонстрира как да се експортира JasperReport в SVG.

Java

// Инициализация на SVG експортер
ASSvgExporter svgExporter = new ASSvgExporter();
ASSvgExportConfigurationImpl svgExportConfiguration = new ASSvgExportConfigurationImpl();
// Включване на шрифтовете в експортирания SVG
svgExportConfiguration.setEmbedFonts(true);
// Включване на компресия
svgExportConfiguration.setCompress(true);

svgExporter.setConfiguration(svgExportConfiguration);

// Задаване на входа за експортиране
exporterInput = new ASExportInputImpl(jasperPrint);
svgExporter.setExporterInput(exporterInput);

// Задаване на изхода за експортиране
exporterOutput = new ASExporterOutputImpl("shapesExample.svg");
svgExporter.setExporterOutput(exporterOutput);

// Извършване на експорта на отчета
svgExporter.exportReport();