Conditional Headers and footers

  • Thread starter Thread starter aweise
  • Start date Start date
A

aweise

I need to add the text (continued on next page) when there are mor
records in a group and then place the group heading on the next pag
with the words continued as part of the heading.

I have been pulling my hair trying to find a solution. I have variou
solutions that work for other scenarios but not for this.

Your help is greatly appreciated.

The page should look like this:

Provider Name: Concesco Annuity Co.
URL: http://www.concesco.com
Phone Number: 800-333-2211

Rep Name:
Rep Phone:
Rep Email:

(Continued on next page)

-----end of page----------

Concesco Annuity Co. Continue
 
aweise said:
I need to add the text (continued on next page) when there are more
records in a group and then place the group heading on the next page
with the words continued as part of the heading.

I have been pulling my hair trying to find a solution. I have various
solutions that work for other scenarios but not for this.

Your help is greatly appreciated.

The page should look like this:

Provider Name: Concesco Annuity Co.
URL: http://www.concesco.com
Phone Number: 800-333-2211

Rep Name:
Rep Phone:
Rep Email:

(Continued on next page)

-----end of page----------

Concesco Annuity Co. Continued


To do this kind of thing, you need to know whether you're
working on the first, last or some other record. This can
be done by having an invisible(?) text box named txtGrpCount
in the group header section with the expression =Count(*)
This will be used to check if you're working on the last
record in the group.

Now add an invisiible(?) text box named txtLineCount to the
Detail section. Set its ControlSource expression to =1 and
its RunningSum property to Over Group.

Next, set the group header sections RepeatSection property
to Yes to make it appear on each page of the group.

To get the "continued" in the group header, add a label
named lblContinued and use the following code in the
header's Format event:
Me.lblContinued.Visible = (txtLineCount > 1)

To get "(Continued on next page)" at the bottom of the page,
add a label named lblNextPage to the page footer and use
this code in the page footer section's Format event:
Me.lblNextPage.Visible = (txtLineCount < txtGrpCount)
 
Back
Top