mediais = new ByteArrayInputStream(output.toByteArray());
amedia = new AMedia("FileFormatExcel", "xls", "application/vnd.ms-excel", mediais);
callReportWindow(this.amedia, "XLS");
} else if (outputFormat.equalsIgnoreCase("RTF") || outputFormat.equalsIgnoreCase("DOC")) {
JRRtfExporter exporterRTF = new JRRtfExporter();
exporterRTF.setParameter(JRExporterParameter.JASPER_PRINT, jp);
exporterRTF.setParameter(JRExporterParameter.OUTPUT_STREAM, output);
exporterRTF.exportReport();
mediais = new ByteArrayInputStream(this.output.toByteArray());
amedia = new AMedia("FileFormatRTF", "rtf", "application/rtf", mediais);
callReportWindow(amedia, "RTF-DOC");
}