Jump to content

Combining minHeightToStartNewPage with boolean....


hovendal

Recommended Posts

Hi all,

 

I have a dummy group which includes a subreport - each element of height 15 + a summary of height 25. I need my group to start a new page when there is room for less than 4 lines, so i set minHeightToStartNewPage=(4*15+25)=85.

But if a subreport only holds <= 3 lines, a pagebreak shouldn't be issued, since 3 lines and less can fit and in the 85px margin. How can I do this? I am using a custom datasource of type java.util.set, so i can easily issue a $p{datasource}.size() to find out how many rows it contains... But I am not sure how to combine this effectivily with minHeightToStartNewPage.

 

Thanks for any help.

 

BR Hovendal

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

You could do this only if you knew in advance how many rows are going to be in that group.

Do you have this information? Because if you do, you could use this information in the group expression and make it in such a way that it would not break if there were less than 4 records left.

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

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...