Jump to content

Can I request a report inline instead of downloading


Recommended Posts

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?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

  • 6 years later...

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