exporter.setExporterOutput(exporterOutput);
if (ReportOutputType.pdf == outputType) { exporter = new JRPdfExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); exporter.setConfiguration(new SimplePdfExporterConfiguration()); } else if (ReportOutputType.html == outputType) { exporter = new HtmlExporter(); exporter.setExporterOutput(new SimpleHtmlExporterOutput(outputStream)); exporter.setConfiguration(new SimpleHtmlExporterConfiguration()); } else if (ReportOutputType.csv == outputType){ exporter = new JRCsvExporter(); exporter.setExporterOutput(new SimpleWriterExporterOutput(outputStream)); SimpleCsvExporterConfiguration config = new SimpleCsvExporterConfiguration(); config.setFieldDelimiter(CSV_DELIMETER); } else if (ReportOutputType.doc == outputType ){ exporter = new JRRtfExporter(); exporter.setExporterOutput(new SimpleWriterExporterOutput(outputStream)); exporter.setConfiguration(new SimpleRtfExporterConfiguration()); } else if (ReportOutputType.docx == outputType){ exporter = new JRDocxExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); exporter.setConfiguration(new SimpleDocxExporterConfiguration()); } else if (ReportOutputType.xls == outputType){ exporter = new JRXlsExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); exporter.setConfiguration(new SimpleXlsExporterConfiguration()); } else if (ReportOutputType.xlsx == outputType){ exporter = new JRXlsxExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream));
if (ReportOutputType.pdf == outputType) { exporter = new JRPdfExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); exporter.setConfiguration(new SimplePdfExporterConfiguration()); } else if (ReportOutputType.html == outputType) { exporter = new HtmlExporter(); exporter.setExporterOutput(new SimpleHtmlExporterOutput(outputStream)); exporter.setConfiguration(new SimpleHtmlExporterConfiguration()); } else if (ReportOutputType.csv == outputType){ exporter = new JRCsvExporter(); exporter.setExporterOutput(new SimpleWriterExporterOutput(outputStream)); SimpleCsvExporterConfiguration config = new SimpleCsvExporterConfiguration(); config.setFieldDelimiter(CSV_DELIMETER); } else if (ReportOutputType.doc == outputType ){ exporter = new JRRtfExporter(); exporter.setExporterOutput(new SimpleWriterExporterOutput(outputStream)); exporter.setConfiguration(new SimpleRtfExporterConfiguration()); } else if (ReportOutputType.docx == outputType){ exporter = new JRDocxExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); exporter.setConfiguration(new SimpleDocxExporterConfiguration()); } else if (ReportOutputType.xls == outputType){ exporter = new JRXlsExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); exporter.setConfiguration(new SimpleXlsExporterConfiguration()); } else if (ReportOutputType.xlsx == outputType){ exporter = new JRXlsxExporter(); exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream));
: new SimpleOutputStreamExporterOutput(destinationFileName); exporter.setExporterOutput(output); return exporter;