Jump to content
We've recently updated our Privacy Statement, available here ×

How to create a table with repeating the parent element values


ronkiron

Recommended Posts

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.jpg.6ad41f97d0fb2ed9f8e2fbebf73debb2.jpg

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.jpg.d8e535b72ca0f325ddd10a933e0147c7.jpg

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                    }                ]            }]        }    ]}[/code]

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! 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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...