JasperReports' iReport - generating a grand total

后端 未结 2 1841
刺人心
刺人心 2021-01-19 10:25

I have a variable datatype set up in the group footer band that generates a subtotal for the counts in each group in my report. Works great. I would like a grand total to g

2条回答
  •  不思量自难忘°
    2021-01-19 10:48

    You can use two variables with different resetType - for calculating sum in group (with resetType="Group" resetGroup="groupName" calculation="Sum" properties) and for calculating total sum for whole report (with resetType="Report" calculation="Sum" properties).

    The sample (jrxml file):

    
    
        
        
        
        
             18 ORDER BY POSITIONNO]]>
        
        
        
        
        
        
            
            
        
        
            
            
        
        
            
            
                
                    
                        
                        
                            
                            
                            
                            
                        
                        
                            
                        
                        
                    
                
            
            
                
                    
                        
                        
                            
                        
                        
                    
                
            
        
        
            
                
                    
                    
                    
                
                
                    
                    
                    
                
                
                    
                    
                    
                
            
        
        
            
                
                    
                    
                        
                    
                    
                
            
        
    
    

    The result will be:

    The result in iReport preview

提交回复
热议问题