Pagination depending on data

fat controller

Slightly round the bend..
Local time
Today, 22:34
Joined
Apr 14, 2011
Messages
758
I have a report which has information set out in groups, with some fixed page breaks entered where I need them. However, on occasion, the information that is shown on the report may be such that it rolls over to another page, which means that the group is split between the two.

Is there any way to have a dynamic page break, whereby if the data for group of fields is not going to fit onto one page, that the report automatically inserts a page break at the top of the group? On format property maybe?
 
not sure if it is what you are looking for, but in the grouping and sorting options there is an option to keep group on one page - so if it won't fit on the page, it will execute a formfeed before reporting the group
 
In the Group properties there is a Force New Page option. I usually set this to Before Section, and not use a Page Break.
 
Thank you both :)

I was looking at it the wrong way, and hadn't even considered using grouping - works perfectly now.
 
Is there a way to hide an entire group, and not have empty space left, if the textboxes (or at least one of them) is empty?
 
You can set can grow / Shrink to yes and reduce the vertical size to negligible, or you can add some code to the on format section to suppress the section based on your criteria.
 
The code on format would be ideal - I am assuming that would be something along the lines of:

Code:
 me.something.visble= (len(me.textbox & vbNullstring)>0)

If so, what would the 'something' be?
 
If you put the code in the GroupFooter1 something like

Code:
If (Me.Prorata) = True Or (Me.MultiYear) = True Then
    Me.GroupFooter1.Visible = True
Else
    Me.GroupFooter1.Visible = False
End If
 
Last edited:
Would all of the text boxes etc need to be in the footer too? They are currently in the header.
 
No sorry - my example was from a GroupFooter, it should work exactly the same when it's a GroupHeader
 

Users who are viewing this thread

Back
Top Bottom