How to create a table with repeating the parent element values

Hi All,

I have a requirement to create a table using Json data and export to .xlsx format. I'm able to create the table as shown below: Generated output

The requuirement I have is to iterate the values in A, B, C and D columns based on the number of rows in the E and F columns. The expected output is:

Expected output

The Json file I've used to print the table is : 

{
    "root": [{
            "firstName": "John",
            "lastName": "Doe",
            "accounts": [{
                "bank": "LLOYDS",
                "accountNumber": 123456,
                "references": [{
                        "name": "Eva Doe",
                        "refAccountNumber": 6549873
 
                    },
                    {
                        "name": "Robin Doe",
                        "refAccountNumber": 3216545
 
                    },
                    {
                        "name": "Peter Doe",
                        "refAccountNumber": 9876549
 
                    }
                ]
 
            }]
        },
        {
            "firstName": "James",
            "lastName": "Doe",
            "accounts": [{
                "bank": "HSBC",
                "accountNumber": 654321,
                "references": [{
                        "name": "Sam Doe",
                        "refAccountNumber": 6549873
 
                    },
                    {
                        "name": "Roger Doe",
                        "refAccountNumber": 3216545
 
                    },
                    {
                        "name": "Jason Doe",
                        "refAccountNumber": 9876549
 
                    }
                ]
 
            }]
        }
    ]
}

Please review the attached .jrxml file and help me to iterate the values in A, B, C and D columns based on the number of rows in the E and F columns and get the expected output as shown in the pic above. Thank you all so much!

Attachments: 
ronkiron's picture
Joined: May 18 2017 - 10:28pm
Last seen: 1 month 1 week ago

0 Answers:

No answers yet
Feedback
randomness