【问题】
I am new to Jasper report. I am working on the report which shows transaction data in a table. I have several groups in the table (the group number is not fixed), for the 1st item of each group, I don’t need to show the “+” sign before the item’s actual text. If there are more than 1 items for the group, then I need to show the “+” sign before the item’s actual text, and calculate the subtotal for the group items. If there is only 1 item for the group, I don’t need to calculate the subtotal.
In the table, I only show the items for each group, I don’t show each group’s name.
Could someone please advise on how to achieve this? How to show the “+” sign conditionally, and how to calculate the subtotal conditionally?
Thanks!
(for group1)
item1 value1
+item2 value2
subtotal group1
(for group2)
item1 value1
+item2 value2
+item3 value3
subtotal