Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

vote4me's Achievements

  1. 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.
  2. Manojshishodia, this is an educated guess, but to change the request from POST to GET, you would have to write a custom data source and use another parameter. The XML_URL is part of the RemoteXmlDataAdapterService class (http://jasperreports.sourceforge.net/api/net/sf/jasperreports/data/xml/RemoteXmlDataAdapterService.html).
  3. Yes, I do manually insert the XML_URL parameter using JS Studio on a Mac (which may explain the skipping of the Select Resources page). I'm not using either Groovy or Javascript as i'm learning JR... Which also explains why I don't have my JSON adapter yet. I got pulled away onto another project. I'll be back on it in the new year. Perhaps there will be another brave soul to make it easier. Thanks, and happy holidays! Stephen...
  4. Thanks again for the info. I'm referring to a step after I save/publish from JR Studio 5.5 to JR Server 5.5. Specifically, after I say "yes" to publish the report to the server, I then get a "Select Resources to publish" window to which I have to click on my parameters if I want to update them. If I do not check them, any parameter changes are lost. Here's a screencap from my JRStudio screen: http://imgur.com/FgFNxkJ
  5. No worries, Marius. First, thanks for the links. Will research and probably open a new post. As for the input controls documentation, I only relied on the web and the JRS Web Services Guide, section 3.3, which does not explain much. Through trial and error, when I used JR Studio to create the report, I did NOT have to manually create the input control on the server afterward (as some other posts point out). In other words, as long I created the parameter in JRStudio, the parameter showed up in the report on the server--assuming you setup the syncing and checked the parameters to upload. On the other hand, as my first parameter does not seem to dynamically alter the second parameter (XML_URL), maybe I'm wrong about the whole input control concept! Also of note, the XML_URL is a built-in parameter that keys the remote XML data source so that's why my answer works. I hope I answered your question, but if not, drop me a line. Stephen...
  6. To understand this answer, please refer to the comment I made a couple of days ago. The report is working properly now by removing the rss_feed parameter and using XML_URL only. So in my jrxml file, the parameter now reads: <parameter name="XML_URL" class="java.lang.String"> <!-- If the XML_URL query string is not passed, default to a default XML remote source to prevent an empty report. --> <defaultValueExpression><![CDATA[$P{XML_URL} ? $P{XML_URL} : "http://somesite.com/somefeed.xml"]]></defaultValueExpression> </parameter> So now I can set the remote XML data source straight from the URL: http://localhost:8080/rest_v2/reports/reports/test/TEST_1.html?XML_URL=[whatever _URL] Now, that this works, if someone can point me on how I can create a new Remote JSON adapter, I would appreciate any feedback.
  7. I am trying to do the same thing (but with version 5.5.0), and I have gotten 1/2 of the solution—namely, I can successfully pass the XML remote datasource to a JasperReport Server (JRS) parameter via a URL query string (not to be confused with JRS querystring). Unfortunately, while the report output recognizes my parameter, the report also thinks my remote data source is null... That may not have made sense, so here are my steps: 1. Use Jaspersoft Studio to create a report using a remote XML as your datasource. Good tutorial here 2. Manually edit the JRXML file to remove the statically defined remote datasource and replace it with two parameters (the first one is to capture the value as passed in your URL, and the second is the new (and supposedly dynamic) XML remote datasource: <parameter name="rss_feed" class="java.lang.String"/> <parameter name="XML_URL" class="java.lang.String"> <defaultValueExpression><![CDATA["http://somesite.com/" + $P{rss_feed}]]></defaultValueExpression </parameter> 3. Send the report to the Jasper Report Server (JRS). Please note that you have to manually copy the xpath2 extension to JRS first if you have not already done so. 4. View the input controls of the new report via the REST2 web service like so: http://localhost:8080/rest_v2/reports/reports/test/TEST_1/inputControls/values/?rss_feed=FOO 5. Now here is the disconnect. The above API call returns XML that shows that my parameter rss_feed is correctly set to "FOO"; however, my XML_URL parameter does not contain that extra FOO. Hopefully, you can help us both figure it out.
  • Create New...