I have a JSONDatasource that I want to use to create a report. The data contains a list of items I want to present in a Table. The data looks like:
{ "sensors":{ "reportDate:"12-04-2014",
"rows":[
{"eventCode":2},{"eventCode":3},{"eventCode":4},{"eventCode":5}
] } }
I am able to acces the report date with the following:
<queryString language="json">
<![CDATA[sensors]]>
</queryString>
<field name="reportDate" class="java.lang.String">
<fieldDescription><![CDATA[reportDate]]></fieldDescription>
</field>
I cannot figure out how to use the rows in a table. There is not much on the web and the documentation and samples only talk about subreports which this is not.
Thanks
Scott
2 Answers:
I've recently posted an answer to a similar question on StackOverflow: http://stackoverflow.com/a/39568989/5882963
Although my answer involves using a List due to its simpler syntax, the switch to a Table should be fairly easy.
If you have any issues I'll add a complete solution for your case.
Please provide me complete solution. I have sean it but as I am new to jasper soft I am totally confused.
If you can provide me jr xml code similar to my solution using json as shown in exmaple and table as shown in example having rowspan on <td> based on inner json list that would be really helpful for me.
As we are on the peak of deadlines.
Looking forward for your reply
Yes ,you are right ..No one is giving exact solution ,only talking other things. Am alsofacing this issue ,and trrying to find since week. but i didn't ..