Jump to content
We've recently updated our Privacy Statement, available here ×

mick1027

Members
  • Posts

    3
  • Joined

  • Last visited

mick1027's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello, The technology I am using is Java. If I am in the wrong forum, please let me know. My goal was to call a RESTFul service to produce a ‘text’ version of a report. Even though IReports support this format, it does not appear the Jasper RESTFul services support this output type. If there is a way to produce a TEXT version, please let me know. Another approach I took was to call RESTFul services and requesting a JRPRINT version ( output type ). I see through the JasperReport APIs, there is a way to export a JRPRINT file to text using the JRTextExporter. However, I am not sure how to ustilize or make the correct resource descriptor parameter that is required for this call through REST to get the JRPRINT output type. Reading the RESTful service guide I see this: "Argument used to pass a transformer key to be used when running a report using JRPRINT as output format. The transformer key will be used to transform generic elements in the generated report as per net.sf.jasperreports.engine.export.GenericElementReportTransformer. This is a required argument when using multipart requests." How is the transformer key setup? Is there a better way of accomplishing this? Thanks Post Edited by mick1027 at 02/22/2012 19:12
  2. found the answer to my question.. Something like this works: <?xml version="1.0" encoding="UTF-8"?><resourceDescriptor isNew="false" name="Report1" uriString="/organizations/organization_1/Reports1/Report1" wsType="reportUnit"> <label><![CDATA[report_1]]></label> <creationDate>1317135409000</creationDate> <parameter name ="exampleParm1" >10</parameter> <parameter name ="exampleParm2" >011010</parameter> <resourceProperty name="PROP_RESOURCE_TYPE"> <value><![CDATA[com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit]]></value> </resourceProperty> <resourceProperty name="PROP_PARENT_FOLDER"> <value><![CDATA[/organizations/organization_1/Reports1]]></value> </resourceProperty> <resourceProperty name="PROP_VERSION"> <value><![CDATA[5]]></value> </resourceProperty> <resourceProperty name="PROP_RU_ALWAYS_PROPMT_CONTROLS"> <value><![CDATA[true]]></value> </resourceProperty> <resourceProperty name="PROP_RU_CONTROLS_LAYOUT"> <value><![CDATA[1]]></value> </resourceProperty> <resourceProperty name="PROP_RU_INPUTCONTROL_RENDERING_VIEW"> <value/> </resourceProperty> </resourceDescriptor>
  3. Hi, The documentation ( pg 30 of JASPERREPORTS SERVER WEB SERVICES GUIDE 4.2 ) The body of the PUT request should contain a resource descriptor of type reportUnit with the URI of the report unit to run. The resource descriptor can contain one or more parameter tags to specify parameters. Lists can be passed using parameters with the same name and the isListValue attribute set to true. The arguments can be placed in the URL of the request or by encoding them in the multipart request. However, some application servers such as Apache Tomcat do not process arguments that are www-url-encoded in the request when sent to a PUT method, so be sure you are using a multipart request or you are using the GET style parameters when using this method. I read this and was not clear on what XML elements to use for passing parameters.. Does anyone have an example of passing report parameters utilizing a RESTful service? I would like to set this up in the body of the PUT that woudl generate the report. How would I setup up the XML in the below example? <?xml version="1.0" encoding="UTF-8"?><resourceDescriptor isNew="false" name="test_report" uriString="/organizations/organization_1/Reports1/test_report" wsType="reportUnit"> <label><![CDATA[test_report]]></label> <creationDate>1317157868000</creationDate> <resourceProperty name="PROP_RESOURCE_TYPE"> <value><![CDATA[com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit]]></value> </resourceProperty> <resourceProperty name="PROP_PARENT_FOLDER"> <value><![CDATA[/organizations/organization_1/Reports1]]></value> </resourceProperty> <resourceProperty name="PROP_VERSION"> <value><![CDATA[3]]></value> </resourceProperty> <resourceProperty name="PROP_RU_ALWAYS_PROPMT_CONTROLS"> <value><![CDATA[true]]></value> </resourceProperty> <resourceProperty name="PROP_RU_CONTROLS_LAYOUT"> <value><![CDATA[1]]></value> </resourceProperty> <resourceProperty name="PROP_RU_INPUTCONTROL_RENDERING_VIEW"> <value/> </resourceProperty> </resourceDescriptor> Thanks! Post Edited by mick1027 at 01/31/2012 13:34
×
×
  • Create New...