We are trying to build a JasperReport for an estimate via JSON. The header and lines (multiple) are fine. However, there is one more node in the JSON file which requires to be looped in the detail table. We are not able to achieve it using subdataset. Currently, we are using JSONQL to iterate the lines.
We are unable to loop the taxes
node via subdataset.
Below is the sample JSON input:
{ "taxes": [ { "tax_slab_name": "VAT Exempt", "tax_amount": "AED 20.00" }, { "tax_slab_name": "VAT 0%", "tax_amount": "AED 30.00" }, { "tax_slab_name": "VAT 5 %", "tax_amount": "AED 50.00" } ], "header": [ { "estimate_no": "EST-000054", "bill_to_address": "111 Stamm Cliffs Suite 285, Heaney Ville, Jebel Ali, Dubai, United Arab Emirates (UAE)", "ship_to_address": "66015 شارع بلال السهلي, ممر ميسر مدني, Jebel Ali, Dubai, United Arab Emirates (UAE)", "estimate_date": "2020-05-08", "expiry_date": "2020-05-23", "sub_total": 14000, "discount": 0, "tax_amt": 450, "total": 14450, "conditions": "All charges are in United States Dollar (USD) unless otherwise stated. E. and O.E.", "status": "SAVED", "contact_name": "Kerluke, Bartell and Dickinson (مجموعة الداوود وأولاده)" } ], "lines": [ { "item_name": "Enterprise Product Development - Java/JSF/PF", "tax_slab": 1, "uom": "box", "quantity": 1, "rate": 1000, "amount": 1000 }, { "item_name": "Server Setup", "tax_slab": 2, "uom": "cm", "quantity": 2, "rate": 2000, "amount": 4000 }, { "item_name": "Backup and DR Service", "tax_slab": 2, "uom": "cm", "quantity": 2, "rate": 2000, "amount": 4000 } ] }
Datasource Type: JSONQL
JasperReport Version: 6.12.2 (latest)