Nick Posted March 23, 2007 Share Posted March 23, 2007 Hi everyone! I really hope you can help me with this problem. I export my report to pdf format in a web app. Everything was working fine but sometimes the exported report shows blank until I refresh the internet explorer. I think it's a problem with the jasper because it happens when the sql query in the report returns no rows.I have set the report propertie 'When no data' with the value 'AllSectionsNoDetail' because it shows important data in the title band.The code I use to export the report is:Code:JRPdfExporter exporterPdf = new JRPdfExporter(); response.setContentType("application/pdf"«»);ServletOutputStream outputStream = response.getOutputStream();exporterPdf.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);exporterPdf.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream); exporterPdf.exportReport();outputStream.flush();outputStream.close();Please, I really appreciate your help.Regards,Diego. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now