How to sum the values returned by a subreport placed in detail band?

后端 未结 1 777
一向
一向 2021-01-21 19:34

I have a report and a subreport that basically prints this:

Here is the code for the main report:


    

        
相关标签:
1条回答
  • 2021-01-21 19:50

    You can specify a calculation type (like sum) when returning values from subreports. Therefore if you want to sum returned values for each group, you'll have to do something like this:

    <variable name="returnSum" class="java.math.BigDecimal" calculation="System" resetType="Group" resetGroup="group"/>
    ...
    <returnValue subreportVariable="return" toVariable="returnSum" calculation="Sum"/>
    
    0 讨论(0)
提交回复
热议问题