mediais = new ByteArrayInputStream(output.toByteArray());
amedia = new AMedia("FirstReport.pdf", "pdf", "application/pdf", mediais);
callReportWindow(this.amedia, "PDF");
} else if (outputFormat.equalsIgnoreCase("XLS")) {
JExcelApiExporter exporterXLS = new JExcelApiExporter();
exporterXLS.setParameter(JExcelApiExporterParameter.JASPER_PRINT, jp);
exporterXLS.setParameter(JExcelApiExporterParameter.OUTPUT_STREAM, output);
exporterXLS.setParameter(JExcelApiExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
exporterXLS.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE);
exporterXLS.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporterXLS.exportReport();
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")) {