kdstew Posted February 10, 2012 Share Posted February 10, 2012 I was going through the examples in JasperReports-Server-Web-Services-Guide.pdf and all was working until I got to the example on page 24. GET /jasperserver-pro/rest/resource/images/JRLogo?file=attachment HTTP/1.1I entered into my browser:http://jasperadmin:jasperadmin@localhost:8080/jasperserver/rest/resource/images/JRLogo?file=attachmentas the example described, but instead of downloading the JRLogo file I was displayed the error message:request contains unsupported parametersThe only parameter I'm passing is file and the documentation specifically says that it is a parameter that can be passed here. Is this functionality supported in the community version?Any help would be appreciated, Thanks in advance. Link to comment Share on other sites More sharing options...
danparrott Posted February 15, 2012 Share Posted February 15, 2012 Instead of appending '?file=attachment' try using '?fileData=true', e.g.:http://jasperadmin:jasperadmin@localhost:8080/jasperserver/rest/resource/images/JRLogo?fileData=true Link to comment Share on other sites More sharing options...
kdstew Posted February 15, 2012 Author Share Posted February 15, 2012 Using fileData=true works!What resourse was that parameter described? I did a quick google search for "Jasper reports fileData=true" and the best result was this post.Thanks for your help! Link to comment Share on other sites More sharing options...
danparrott Posted February 15, 2012 Share Posted February 15, 2012 Glad to be of service :) AFAIK it's not documented; I had to go through the source to discover it. I've lodged a bug (5644) and presumably the docs will be updated (but it's always possible the docs are 'right' and the app itself will be changed). Link to comment Share on other sites More sharing options...
Ching Ice-creaming Posted February 23, 2012 Share Posted February 23, 2012 Thank you for your help! Link to comment Share on other sites More sharing options...
olivedev Posted March 16, 2012 Share Posted March 16, 2012 OMG I spent hours trying this...thanks to you danparrott !I am now able to download a .jrxml file, but there is no point in downloading a .jrxml file, I want to download a report that has been generated by the scheduler, but I can't because there is no PROP_ATTACHMENT_ID to the generated .pdf file... I know we can download output reports when we first run them through REST with a PUT, using the UUID, but how can we download a contentResource ? For example this link: http://url:port/jasperserver/rest/resource/Reports/Output/report-201203150700.pdf has no PROP_ATTACHMENT_ID and I can't download it... I tried http://url:port/jasperserver/rest/resource/Reports/Output/report-201203150700.pdf?fileData=true but it's not working. Thanks Link to comment Share on other sites More sharing options...
mayoukane Posted March 22, 2012 Share Posted March 22, 2012 I have the same probleme ,I want to dowload a created file (pdf file) but I cannot,can someone help me how to do. Link to comment Share on other sites More sharing options...
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