Jump to content
Changes to the Jaspersoft community edition download ×

XLS, PDF Reports in Internet Explorer


Recommended Posts



My application is using the net.sf.jasperreports.j2ee.servlets.XlsServlet and net.sf.jasperreports.j2ee.servlets.PdfServlet classes to stream reports back to the user's browser. I chose to use these classes because I know there are some rendering quirks with various browsers, and I wanted to use tested code rather than writing my own code that I had to maintain myself.


The problem I'm having is that the PDF and XLS reports are not displaying in Internet Explorer. I know that IE has problems with content-type and there are some tricks that must be used for IE to correctly render an Excel or PDF document correctly. In the past I've written custom classes to stream the reports back to the browser, but this time I wanted to use the built-in Jasper classes to do the heavy lifting. There are some differences in what the Jasper classes are doing vs. what the classes I've written in the past are doing, but I don't know if they're enough to make a difference.


Does anybody have any experience using the Jasper servlets to stream reports back to the browser, and know if these classes work with IE? I'm assuming they do (or have), or why they may not be working in my environment? IE just shows a blank page.


Thank you!!!



Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

by using the billow code i am able to display pdf report in my inter net explorer try this you my get it ok




response.setHeader("Content-Disposition", "inline;filename="+reportName);

ServletOutputStream outputStream=response.getOutputStream();

JRPdfExporter exporter=new JRPdfExporter();

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);



Link to comment
Share on other sites

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...