Jump to content
We've recently updated our Privacy Statement, available here ×

Orphan prevention?


ktrinad

Recommended Posts

By: Steve Cohen - stevecoh2

Orphan prevention?

2004-04-05 14:16

My report contains groups that may extend over several pages, as well as groups that may consist of as little as one detail row and one group footer row.

 

I would like to ensure that a group smaller than a certain size should never be split without forcing a page break on every group. We should never see a single detail row at the bottom of one page and its group footer at the top the next page. I've tried playing with

group.minHeightToStartNewPage and with detail.band.isSplitAllowed and neither seems to work.

 

Is there a way to make jasper do what I want it to? I can't have been the first to ask for this, but I've been through the docs and nothing there looks like it helps me.

 

 

By: Teodor Danciu - teodord

RE: Orphan prevention?

2004-04-17 04:40

 

Hi,

 

I think "minHeightToStartNewPage" can prevent

small groups from starting at the bottom of the page

if there is too little space for the group footer to fit

also on the current page.

For example, if I would want to have groups with

less than 5 rows always printed on a new page

I there is not enough space I would make

"minHeightToStartNewPage" to be at least

5 * detail.height + groupfooter.height

 

However, if you are talking about large or medium

sized groups for which the groups footer gets

printed alone on the next page, then you are right.

 

The only solution in this case is to know beforehand

how many rows are in the group. Only if we know

how many rows are left in the group ca we prevent

orphans unsing a special trick.

The number of rows in the group could be part of

the data source if you make you query calculate it

before passing the data to the report filling routines.

 

https://sourceforge.net/forum/message.php?msg_id=2030708

 

I hope this helps.

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...