How could i write a Group Expression in iReport
with Multiple Fields ? Report output should be as below.
Buyer Product Unit Quantity Total
------------------------------------------
Buyer2 Banana Count 50
50
Buyer2 Banana Kg 5
Buyer2 Banana Kg 5
10
Buyer2 Coconut Count 20
20
Buyer4 Papaya Count 500
500
Buyer4 Mango Count 200
200
Buyer5 Banana Kg 15
Buyer5 Banana Kg 15
30
Best Answer
This simplest thing to do is create multiple groups. SO in your example you would use three groups, one for buyer, product, and unit. You can then use a variable to sum the quantity and have it reset with the unit group.
Below is a basic example JRXML, that you can adapt: