kensonman Posted August 9, 2014 Posted August 9, 2014 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_text=Hello%20World". 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?
hozawa Posted August 10, 2014 Posted August 10, 2014 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.https://support.mozilla.org/en-US/kb/view-pdf-files-firefox-without-downloading-them
vote4me Posted August 14, 2014 Posted August 14, 2014 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.
gustavofarias Posted April 23, 2021 Posted April 23, 2021 The only solution to this that I know is using the HTTP api instead of the rest api. In the http api the content disposition is inline.https://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v720/repository-http-api
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