Jasper page break rule implementation need help

Hi Team,
We need a help on implementing page break rule.
Please refer attached screenshot.
our requirement is 
        
    1. Scenario 1:  Sub header - 3  ( as per attached screenshot) should not touch to the footer. If subheader-3  has only one record, it should print on page first itself, with itls subtotal. If there is not enough space on page first,

     it should the subheader-3 block itself shoule be printed on the next page with it's total
    
    2. Scenario 2: In case subheader - 3 has multiple records, it should print subheader-3 and it's record on page-1 available space, and next records along with subtotal-3 should move to the next page.
    
    3. Scenario 3: Subheader-3 should not touch to the pageFooter, subtotal-3 should not start as a first element on the next page.
    
    Is there any way to implement this. we have tried with minHeightToStartNewPage attribute, but scenario 2 and 3 are not working properly with that solutoion.
    
    Is there any way we can identify how much space is remaining on current page before printing the element on next page.

Thanks,

Ganesh

nashikar.ganesh's picture
Joined: Jun 11 2020 - 1:34am
Last seen: 2 years 8 months ago

1 Answer:

Try setting minDetailsToStartFromTop="1" and preventOrphanFooter="true" for the group.

Regards,

Lucian

lucianc's picture
72210
Joined: Jul 17 2006 - 1:10am
Last seen: 2 hours 26 min ago
Feedback
randomness