How to create multiple tables in jasper report using json as a datasource?
<p>I need to make report like this:</p>

<pre><code>Product Name : Product XYZ

---------------------------------
| Item Name | Quantity | Price |
---------------------------------
| Item ABC  | 10       | 10 $  |
| Item BCD  | 10       | 1  $  |

Product Name : Product XYZ2

---------------------------------
| Item Name | Quantity | Price |
---------------------------------
| Item DEF  | 15       | 10 $  |
| Item HIJ  | 11       | 1  $  |

Summary Report 
---------------------------------
| Product Name | Total Quantity | 
---------------------------------
| Product XYZ  | 20             | 
| Product XYZ2 | 26             | 
</code></pre>

<p>The first problem is "product" can 1 to many.</p>

<p>The second problem is i need "Summary Report" in the bottom</p>

<p>The third problem is ,this raw data report come from <code>json</code>, not from query to database.</p>

<p>What that i already try :</p>

<ul>
<li><p>Create many table for product. But this failed because jasper create empty space for unused table. And the summary table in other page with many empty space.</p></li>
<li><p>Subreports , same like above.</p></li>
</ul>

<p>Can you tell me please, how to make dynamically multiple table's?</p>

<p><strong>EDIT</strong> : sample JSON</p>

<pre><code>{"produkList": {
"items":[ 
    {
        "nameProduct": "Product XYZ",
        "itemList": [{
            "itemName": "XXXXXXX",
            "quantity": 50,
            "price": 50
        },
        {
            "itemName": "YYYYYYY",
            "quantity": 50,
            "price": 50
        },
        {
            "itemName": "ZZZZZZZZ",
            "quantity": 50,
            "price": 50
        }]
    },
    {
        "nameProduct": "Product XYZ2",
        "itemList": [{
            "itemName": "AAAAAAAA",
            "quantity": 50,
            "price": 50
        },
        {
            "itemName": "BBBBBBB",
            "quantity": 50,
            "price": 50
        },
        {
            "itemName": "CCCCCCC",
            "quantity": 50,
            "price": 50
        }]
    }
  ],
  "summary":[
  {
        "title": "Summary Report",
        "summaryReportDetailList": [{
            "nameProduct": "Product XYZ",
            "quantity": 150
        },
        {
            "nameProduct": "Product XYZ2",
            "quantity": 150
        }]
    }
    ]
  }
}
</code></pre>