Can I request a report inline instead of downloading


I'm just setup the JasperServer 5.6.0 (community version) in a testing machine. It is planed to be a report-provider for a web-service.

In my web-service, I'm tyring to show a report in iframe with url "http://localhost:8080/jasperserver/rest_v2/reports/myreport.html?param_t...". The report has been generated successfully, but firefox popup the download dialog box instead of showing in iframe.

After checking, it is because the jasperserver embed the belows statement in HTTP-Header:

Content-Disposition: attachment; filename="myreport.html"

My question is: How can I showing the report in the iframe instead of downloading. Can above header can removed by parameter?

kensonman's picture
Joined: Feb 21 2008 - 10:04am
Last seen: 3 months 3 weeks ago

Kensonman, have you figured this out yet?  Although hozawa is correct that browsers can override what the server sends, it does not answer your question.  I also wish to override JasperServer's content-dispositions when using the rest_V2 web service, but like you, have not found the answer.  If I were using Java and the Jasper Library, it's a simple matter of using setheader, e.g.  response.setHeader("Content-disposition","inline; filename=\"" + file.getName() + "\""); , but not for the web service...  Please let me know if you have an answer.  

Thank you.

vote4me - 6 years 3 months ago

1 Answer:


That's a property of a web browser and not JasperReports setting. Check the following page at Firefox stie on how to view pdf inline.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 year 5 months ago