Index: ssts-web/src/main/webapp/jasperRtp/jasperreportsView.jsp =================================================================== diff -u -r35513 -r35520 --- ssts-web/src/main/webapp/jasperRtp/jasperreportsView.jsp (.../jasperreportsView.jsp) (revision 35513) +++ ssts-web/src/main/webapp/jasperRtp/jasperreportsView.jsp (.../jasperreportsView.jsp) (revision 35520) @@ -124,16 +124,16 @@ String reportExportExtraFormat = sstsConfig.optString("reportExportExtraFormats","0"); SimpleHtmlExporterOutput exporterOutput = null; try{ - if(timeStamp == null ){ + if(timeStamp == null){ timeStamp = ""; } JasperPrint jasperPrint = (JasperPrint)session.getAttribute("JasperPrint"+timeStamp); - JasperPrint jasperPrintForPrint = (JasperPrint)session.getAttribute("jasperPrintForPrint"+timeStamp); - if(jasperPrint != null){ + if(jasperPrint != null && jasperPrint.getPages() != null && jasperPrint.getPages().size() > 0){ reportName = jasperPrint.getName(); String currentTime = new Date().toString(); request.setAttribute("currentTime",currentTime); session.setAttribute("JasperPrint"+currentTime,jasperPrint); + JasperPrint jasperPrintForPrint = (JasperPrint)session.getAttribute("jasperPrintForPrint"+timeStamp); session.setAttribute("jasperPrintForPrint"+currentTime,jasperPrintForPrint); if (jasperPrint.getPages() != null){ lastPageIndex = jasperPrint.getPages().size() - 1;