Bad design issue and best practice : Columnar sub report that loads forever in JasperReports server

Sadakar Pochampalli
JasperSoft BI Suite Tutorials - Sadakar Pochampalli )

Hi , 

Bad Design: 
When you call a columnar sub report (i.e., a report split into several columns) in parent report and if applies "Details Overflow" on the sub report element on the parent then the report output loads forever while running on JasperReports server. Eventually this leads to memory leaks and server goes down with 502 Bad Gate Way response. 

Best Practice(s): 
1) In sub report "Page Format" ensure to have "Print Order"="Horizontal". 
      (
         This property also solves another the issue of weird behavior of report output 
         For instance,  
         > Number of output rows for SQL is 21 
        > Sub report is designed to have 12 columns 
        > Sub report height is 106 
        > Parent report height is 400 
        Expected output:
                    When you run the parent report, it has to have 12 columns displayed until the width and 
                   then  remaining columns in the additional space of parent report. 
        Actual output: 
                   Report displays only  6 column output until the width of report, 
                   in the next empty space another 6 columns and so in next empty space.. 
                    This is simply called "vertical order". 
     ).  

2) Ensure that Sub report height = Sum of bands used in sub report. 

3) In the main report, on the sub report element properties always un-check  "Detail Overflow" check box.  

4) Apply "Position Type" ="Float" on the sub reports if there are more than one. 
     This solves overlapping issue. 

Sub Report Design: 

            Tap on to the image for best view in gallery mode 

Parent Report Design: 

    Tap on to the image for best view in gallery mode 


-  Sadakar Pochampalli 






Feedback