Controlling Page Break in groups
Working with RB7.04, D7E
I'm trying to find a way to ensure that a group header and footer shows
up on the same page.
There is a group GRP1 assigned that controls page breaks (user decides
what field, and I assigne the field prior to calling report).
I've a group GRP2 header that can stretch based on memo content, and a
detail section that of course can be 0, 1, or "n" rows.
The GRP2 footer contains a ppImage - set to a fixed size of 4 inches in
height. HDR2 data may NOT always contain an image.
I'm getting results like:
-------------------
HDR2 (no image related data)
-------------------
DTL
DTl
-------------------
HDR2 (with image related data)
-------------------
DTL
DTl
-------------------
FTR2 IMAGE HERE
=============== (pgBrk)
That works fine, and is what I expect.
Here's the problem:
-------------------
HDR2 A (with image related data)
-------------------
DTL
DTl
-------------------
FTR2 A IMAGE HERE
-------------------
HDR2 B (with image related data)
-------------------
DTL
DTl
-------------------
FTR2 B IMAGE HERE
-------------------
HDR2 C (with image related data)
-------------------
DTL
DTl
=============== (pgBrk)
FTR2 C IMAGE HERE
In other word, the "C" set of data is printing the header information on
page 1, and the image footer by itself on page 2.
What I'd like to do is determine if I should force a page break before
printing the HDR2 information - based on if I print it on current page,
AND there's an image attached, AND I can't print everything on current
page...
If HDR2 was static height I'd just set a NewPageThreshold of the
ppImage.height, but that may not be enough given the dbMemo and unknown
number of detail recs.
(Sorry about length of post - hopefully it's clear enough.)
So, can you suggest how I might go about forcing the pagebreak (or
calculating the threshold value) at the right time?
Cheers,
EdB
I'm trying to find a way to ensure that a group header and footer shows
up on the same page.
There is a group GRP1 assigned that controls page breaks (user decides
what field, and I assigne the field prior to calling report).
I've a group GRP2 header that can stretch based on memo content, and a
detail section that of course can be 0, 1, or "n" rows.
The GRP2 footer contains a ppImage - set to a fixed size of 4 inches in
height. HDR2 data may NOT always contain an image.
I'm getting results like:
-------------------
HDR2 (no image related data)
-------------------
DTL
DTl
-------------------
HDR2 (with image related data)
-------------------
DTL
DTl
-------------------
FTR2 IMAGE HERE
=============== (pgBrk)
That works fine, and is what I expect.
Here's the problem:
-------------------
HDR2 A (with image related data)
-------------------
DTL
DTl
-------------------
FTR2 A IMAGE HERE
-------------------
HDR2 B (with image related data)
-------------------
DTL
DTl
-------------------
FTR2 B IMAGE HERE
-------------------
HDR2 C (with image related data)
-------------------
DTL
DTl
=============== (pgBrk)
FTR2 C IMAGE HERE
In other word, the "C" set of data is printing the header information on
page 1, and the image footer by itself on page 2.
What I'd like to do is determine if I should force a page break before
printing the HDR2 information - based on if I print it on current page,
AND there's an image attached, AND I can't print everything on current
page...
If HDR2 was static height I'd just set a NewPageThreshold of the
ppImage.height, but that may not be enough given the dbMemo and unknown
number of detail recs.
(Sorry about length of post - hopefully it's clear enough.)
So, can you suggest how I might go about forcing the pagebreak (or
calculating the threshold value) at the right time?
Cheers,
EdB
This discussion has been closed.
Comments
If you set the KeepTogether property of your group to True, does this give
you the effect you are after? This will attempt to keep the group entirely
together on a single page. Also, ReportBuilder 9.02 has a native PageBreak
component that allows you to break a page when ever you like inside the
report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com