Unable to use list component with a json datasource

Hi,

 

I'm using iReport 5.6.0 and a json datasource to generate my reports.

Cant copy/paste my json here, its build like this:

{
 
        "item": {
 
            "somePeople": [{
 
                "user": {
 
                    "id": 1,
 
                    "name": "Alice"
 
                }
 
            }, {
 
                "user": {
 
                    "id": 2,
 
                    "name": "Bob"
 
                }
 
            }, {
 
                "user": {
 
                    "id": 3,
 
                    "name": "Mallory"
 
                }
 
            }]
 
        }
 
    }
In my mainreport I use "item" as query.
After adding the list-component, the dataset1 appears.
This is where I use "item.somePeople" as query. Now I'm adding the field "name", having"user.name" in description.
Then I edit list datasource, using the connection expression. The designer adds the param $P{REPORT_CONNECTION}.
Lastly I add the field "name" from dataset1 to my list.
After compiling (no error) the list is empty.
What am I doing wrong?
schakkalakka's picture
Joined: Jun 17 2014 - 5:17am
Last seen: 4 years 9 months ago

Hello there! Did you solve it

blm1225 - 1 year 10 months ago

0 Answers:

No answers yet
Feedback
randomness