JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".pptx");
JRPptxExporter exporter = new JRPptxExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
exporter.exportReport();
System.err.println("PPTX creation time : " + (System.currentTimeMillis() - start));
}
else if (TASK_XHTML.equals(taskName))
{
File sourceFile = new File(fileName);
JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".x.html");
JRXhtmlExporter exporter = new JRXhtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
exporter.exportReport();
System.err.println("XHTML creation time : " + (System.currentTimeMillis() - start));
}
else if (TASK_XML4SWF.equals(taskName))
{
File sourceFile = new File(fileName);
JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xml4swf");
JRXml4SwfExporter exporter = new JRXml4SwfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
exporter.exportReport();
System.err.println("XML4SWF creation time : " + (System.currentTimeMillis() - start));
}
else if (TASK_VIEW_HTML.equals(taskName))
{