Can you tell if a detail section flows over to the next page?

  • Thread starter Thread starter Robert LeBlanc
  • Start date Start date
R

Robert LeBlanc

I need to know how to tell if a detail (or anything other
then a cetain secion) flows to a second page. I want to
include dividers between groups, but not if it is the
first thing on the page. If there is text from the
previous group that starts the page, I want the divider.
I can get it not to show the divider on the first of
every group on a page, but I can not find a property that
tells that the group has flowed over. Please let me know
if you have a solution.
 
The only thing I can think of would be to check and remember the current
page number in the group footer and header. If the previous group footer was
page 2 and the new group header is page 3 then you started a new page. I
haven't tested this.
 
Robert said:
I need to know how to tell if a detail (or anything other
then a cetain secion) flows to a second page. I want to
include dividers between groups, but not if it is the
first thing on the page. If there is text from the
previous group that starts the page, I want the divider.
I can get it not to show the divider on the first of
every group on a page, but I can not find a property that
tells that the group has flowed over.

You can use a Line control at the top of the group header
section. Then you can make the line visible or not using a
little code in the group header's Format event:

Me.Line3.Visible = Me.Top > MARGIN * 1440 + 100

where MARGIN is the size of the top margin in inches.
 
I figured out something that works. I already had
a "global" variable that was reset everytime that the
report was opened. What I was doing before was checking
to see if page equaled the variable. If it didn't, then I
hid the object. That did not do what I wanted though. I
then tried setting the variable equal to the page number
in the detail secion "on Format" event. That luckly
incremented the page number even when the detail
overflowed to a second page. I then tested for page
diffrences in the "on format" in the group header that I
wanted the divider for. If the page numbers were equal,
put the divider, if they were diffrent hide the divider
and set the global variable. Using a similar technique I
was able to get certain other groups to appear on odd
page numbers (if the next page is even it prints a blank
page to put the next group on an odd page). Now if I can
just get a fourth blank page in the report header. It
only allows for 22" (9" pages). This is for a cookbook
that we are doing and we have the title page, blank page,
table of contents, and we would like to insert another
blank page. Unfortunally insert page after section is not
working. Thanks for the help.
 
Robert said:
I figured out something that works. I already had
a "global" variable that was reset everytime that the
report was opened. What I was doing before was checking
to see if page equaled the variable. If it didn't, then I
hid the object. That did not do what I wanted though. I
then tried setting the variable equal to the page number
in the detail secion "on Format" event. That luckly
incremented the page number even when the detail
overflowed to a second page. I then tested for page
diffrences in the "on format" in the group header that I
wanted the divider for. If the page numbers were equal,
put the divider, if they were diffrent hide the divider
and set the global variable. Using a similar technique I
was able to get certain other groups to appear on odd
page numbers (if the next page is even it prints a blank
page to put the next group on an odd page). Now if I can
just get a fourth blank page in the report header. It
only allows for 22" (9" pages). This is for a cookbook
that we are doing and we have the title page, blank page,
table of contents, and we would like to insert another
blank page. Unfortunally insert page after section is not
working.


You can use a PageBreak control where ever you want, so you
don't need the ForceNewPage property or any blank space to
get to a new page..
 
Back
Top