Pagination depending on data (1 Viewer)

fat controller

Slightly round the bend..
Local time
Today, 13:47
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?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:47
Joined
Feb 19, 2013
Messages
16,628
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
 

Awesomo

Registered User.
Local time
Today, 13:47
Joined
Feb 9, 2016
Messages
45
In the Group properties there is a Force New Page option. I usually set this to Before Section, and not use a Page Break.
 

fat controller

Slightly round the bend..
Local time
Today, 13:47
Joined
Apr 14, 2011
Messages
758
Thank you both :)

I was looking at it the wrong way, and hadn't even considered using grouping - works perfectly now.
 

fat controller

Slightly round the bend..
Local time
Today, 13:47
Joined
Apr 14, 2011
Messages
758
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?
 

Minty

AWF VIP
Local time
Today, 13:47
Joined
Jul 26, 2013
Messages
10,371
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.
 

fat controller

Slightly round the bend..
Local time
Today, 13:47
Joined
Apr 14, 2011
Messages
758
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?
 

Minty

AWF VIP
Local time
Today, 13:47
Joined
Jul 26, 2013
Messages
10,371
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:

fat controller

Slightly round the bend..
Local time
Today, 13:47
Joined
Apr 14, 2011
Messages
758
Would all of the text boxes etc need to be in the footer too? They are currently in the header.
 

Minty

AWF VIP
Local time
Today, 13:47
Joined
Jul 26, 2013
Messages
10,371
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

Top Bottom