how to display data less than 5 row in jasper reports

后端 未结 2 393
难免孤独
难免孤独 2021-01-07 08:51

I have created a report table. I have set it to display 5 rows of data per page. The problem now is when there are less than 5 rows of data the table will not appear.

2条回答
  •  甜味超标
    2021-01-07 09:38

    Sorry that I couldn't reply earlier, as I'd a busy day at work. After looking at your report design, I found that 'Page Break' functionality is not something that you really need. I just changed the Group Expression for the group that you have, to : $F{PARENT_NAME} + (($V{REPORT_COUNT} % 5 == 0) ? "1" : "2") and set the 'Start on new page' parameter to true. Also, I changed the Chart data. Check the below jrxml data:

    
    
        
        
        
        
            
        
        
            
        
        
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
            
        
        
            
        
        
            
        
        
            
        
        
            
        
        
            
            
                
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                        
                    
                
            
            
                
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                        
                            
                            
                            
                            
                            
                        
                        
                        
                    
                    
                        
                            
                            
                            
                            
                        
                        
                            
                            
                                
                                
                                
                            
                            
                                
                                
                                
                            
                            
                                
                                
                                
                            
                            
                                
                                
                                
                            
                            
                                
                                
                                
                            
                        
                        
                            
                        
                    
                    
                        
                    
                
            
        
        
            
        
        
            
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
                
                    
                    
                        
                        
                        
                        
                        
                    
                    
                    
                
            
        
        
            
                
                    
                    
                    
                
                
                    
                    
                    
                
            
        
    
    

提交回复
热议问题