Jump to content
Changes to the Jaspersoft community edition download ×

How to use JSON list as data in a Table in a Jasper Report


scott_ryan_1

Recommended Posts

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

Link to comment
Share on other sites

  • 2 years later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...