Jump to content
We've recently updated our Privacy Statement, available here ×

exported report shows blank until I refresh web


Nick

Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...