B
Bob Howard
I have a report with several group headers (and one has a footer), plus a
page header section. These are a series of receipts for money received.
On the first page of each receipt, I don't want to print the page header
section. The first (most major) group header section contains all the
information to be printed at the top of the first page of any receipt.
But if any receipt continues to a second page, I do want to print the page
header section ... it's considered an "overflow" page and the header simply
contains the receipient's name and the column headings.
Using VBA code behind all this, I've been using the "page number control"
(in the header) as a flag to indicate whether the page header section should
print. Initially, this is set to zero. In the format event for the page
header section, I add one to the page number. If the result is one, then I
return with "Cancel=True" and the page header does not print. If the result
is other than one, I allow the page header section to print. I do all this
only when "FormatCount=1".
When the last line of an individual receipt prints, I set the page number to
zero again (in preparation for the next receipt). I know when the last line
prints because I have a special group footer with a print event. This group
footer will always be the last thing to print for the receipt, and merely
contains a small blank space (no controls).
Now here's the problem. Every so often, I'll be missing the "overflow" page
header. This should only occur when the page number is reset to zero. That
would indicate that the print event for that little blank area has fired.
Is it possible that I'm retreating from the print event and the entire
"overflow" page is being re-formatted? That's the only thing I can think
of.
Should I implement a "retreat" event for that little blank area where I set
the page number page to where it was before I made it a zero?
bob
page header section. These are a series of receipts for money received.
On the first page of each receipt, I don't want to print the page header
section. The first (most major) group header section contains all the
information to be printed at the top of the first page of any receipt.
But if any receipt continues to a second page, I do want to print the page
header section ... it's considered an "overflow" page and the header simply
contains the receipient's name and the column headings.
Using VBA code behind all this, I've been using the "page number control"
(in the header) as a flag to indicate whether the page header section should
print. Initially, this is set to zero. In the format event for the page
header section, I add one to the page number. If the result is one, then I
return with "Cancel=True" and the page header does not print. If the result
is other than one, I allow the page header section to print. I do all this
only when "FormatCount=1".
When the last line of an individual receipt prints, I set the page number to
zero again (in preparation for the next receipt). I know when the last line
prints because I have a special group footer with a print event. This group
footer will always be the last thing to print for the receipt, and merely
contains a small blank space (no controls).
Now here's the problem. Every so often, I'll be missing the "overflow" page
header. This should only occur when the page number is reset to zero. That
would indicate that the print event for that little blank area has fired.
Is it possible that I'm retreating from the print event and the entire
"overflow" page is being re-formatted? That's the only thing I can think
of.
Should I implement a "retreat" event for that little blank area where I set
the page number page to where it was before I made it a zero?
bob