try {
tmpFile = File.createTempFile(fileName, "." + outputType, dir);
out = new FileOutputStream(tmpFile);
StringBufferInputStream sbis=new StringBufferInputStream(templateStr);
logger.debug("compiling report");
JasperReport report = JasperCompileManager.compileReport(sbis);
//report.setProperty("", )
logger.debug("filling report");
JasperPrint jasperPrint = JasperFillManager.fillReport(report, parameters, datasource);
JRExporter exporter=null;
if(outputType.equalsIgnoreCase("PDF")){