exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, print);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, outputByteArray);
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporterXLS.exportReport();
outStream.write(outputByteArray.toByteArray());
} else // PDF by default
{
returnResult = tempFolder + "readonly.pdf";
outStream = new FileOutputStream(new File(returnResult));