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

erwanletutour.elt

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by erwanletutour.elt

  1. Solved this: Now I only pass 1 parameter to my rapport, a json string with all my parameters as fields. I use a data adapter that match that string and replaced all the $P{xxxx} by $F{xxxx}. Then I use the JSON_INPUT_STREAM parameter of the report to cast that string to byte array input stream. In this json string, my lists object are described like this "LIST_SKILL": [ ["skill one", "value 1"], ["skill two", "value 2"], ["skill three", "value 3"]] Then on my list object, in the dataSet properties::JRDatasource expression ((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("LIST_SKILL") After that, my report is correctly generated in jaspersoft studio / server and with rest service call.
  2. I have 2 jasperserver, I exported the report from the first one and imported them on the second one. But when i tried to edit my report using rest service, I have 400 BAD REQUEST because all my subreport path where replaced by repo:subreportName.jrxml. In my 2 servers I have the same folder hierarchy : root organisationprojectreport folder 1report 1sub report 1sub report 2report folder 2 ...I tried to overwrite the subreports path to have something more global but all my tentative didn't worked. Here a list of all my tentative /root/Organisation/Project/Reports/Reports-family/report-folder/sub_report_1.jrxml /root/Organisation/Project/Reports/Reports-family/report-folder/sub_report_1 /Organisation/Project/Reports/Reports-family/report-folder/sub_report_1 /Organisation/Project/Reports/Reports-family/report-folder/sub_report_1.jrxml /Project/Reports/Reports-family/report-folder/sub_report_1.jrxml /Project/Reports/Reports-family/report-folder/sub_report_1 sub_report_1 sub_report_1.jrxml ./sub_report_1.jrxml ./sub_report_1 repo:sub_report_1 repo:sub_report_1.jrxml If someone have any clue to how I can solve this issue, he would have all my thanks.
  3. Thank for your answer, i tried it, but it only take the last value in the report, it seem like it overwrite the first value passed
  4. Hello, I have some trouble generating jasper report when i try to pass more than on value to a collection type parameter in my request body. In my rapport my parameter is decribed like this <parameter name="skillList" class="java.util.Collection" nestedType="java.lang.String"> <parameterDescription><![CDATA[list of skill]]></parameterDescription></parameter>[/code]In jaspersoft studio when i tried to visualize my report and add more value it work well and my report is generated But when i try to use the execution service of the server using HTTP POST with a request body like this one : <reportExecutionRequest> <reportUnitUri>MyReportURI</reportUnitUri> <async>false</async> <outputFormat>pdf</outputFormat> <parameters> <reportParameter name="title"> <value>--- titre test ---</value> </reportParameter> <reportParameter name="header"> <value>@@@ header test @@@</value> </reportParameter> <reportParameter name="name"> <value>LE TUTOUR</value> </reportParameter> <reportParameter name="surname"> <value>Erwan</value> </reportParameter> <reportParameter name="skillList"> <value>java</value> <value>maven</value> </reportParameter> </parameters></reportExecutionRequest>[/code]I got an error HTTP 400, in the documentation of the service there is many exemple with more than one value so i don't understand why my repport is not generated. EDIT In a new attempt I changed my parameter, it's now a subdataset <subDataset name="listSkill" uuid="8027f62e-3b29-4faf-b11a-185b4db46d6f"> <field name="skill" class="java.lang.String"> <fieldDescription><![CDATA[_THIS]]></fieldDescription> </field></subDataset>[/code]and the way to use it <componentElement> <reportElement x="0" y="200" width="100" height="30" uuid="26b52f0f-e1e0-451e-9183-2df0f1f1ce65"/> <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <datasetRun subDataset="listSkill" uuid="593d4d96-cbaf-46ba-94ef-97344e0cb4f2"> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{skills}) ]]></dataSourceExpression> </datasetRun> <jr:listContents height="30" width="100"> <textField> <reportElement x="0" y="0" width="100" height="30" uuid="061f84d9-205a-4f49-a711-1f657b1fa5fd"/> <textFieldExpression><![CDATA[$F{skill}]]></textFieldExpression> </textField> </jr:listContents> </jr:list> </componentElement>[/code]but still got the same error at the generation
×
×
  • Create New...