how do I create a list with comma separated values and a dynamic list-size?



title says it all. I'm using a json as datasource.
In this json I got an array of objects:

        "item": {
            "somePeople": [{
                "user": {
                    "id": 1,
                    "name": "Alice"
            }, {
                "user": {
                    "id": 2,
                    "name": "Bob"
            }, {
                "user": {
                    "id": 3,
                    "name": "Mallory"

My report is using item as query. The dataset from that list is using item.somePeople as query; the field in this list is
Is there any possibility to display those values comma separated with a dynamic list-size?

schakkalakka's picture
Joined: Jun 17 2014 - 5:17am
Last seen: 1 year 12 months ago


$V{allName} + $F{name} + ", "

I'm using a subreport to print this value.
But my current problem is that I get 3 rows of names:


name1, name2,

name1, name2, name3,

But all I want is the last one

Any suggestions?



schakkalakka - 5 years 9 months ago

2 Answers:


The above suggests you're populating a variable allName with each row, in which case all you may need is a TextField with 'Evaluation Time' set to Report and reference $V{allName}.

Alternatively, if you know how many rows you have, you can use a conditional print looking at REPORT_COUNT to check if it's the final row before printing the detail band.

gnomeking_jasper's picture
Joined: Jun 30 2014 - 2:31am
Last seen: 5 years 8 months ago

i am too looking for priting list of values into single text fields with comma separated , can you please your sample. since when i apply above hints its still prints list of values for me. i want only the last values. 

2340patel's picture
Joined: Jan 11 2018 - 8:38pm
Last seen: 1 year 1 month ago