Page Heading Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here's the scenario I have. I have a normal page heading for every page. I want to have a different page heading on the last page and each page that is a grouping footer. I have a force new page before the group footer. I know how to have a different page header on the last page from every othe rpage using the .visible property setting where page=pages. Is their a way top call a section in a similar way so i can have a different section heading on every grouping footer page
 
George said:
Here's the scenario I have. I have a normal page heading for every page. I want to have a different page heading on the last page and each page that is a grouping footer. I have a force new page before the group footer. I know how to have a different page header on the last page from every othe rpage using the .visible property setting where page=pages. Is their a way top call a section in a similar way so i can have a different section heading on every grouping footer page.


I think you'll need to control the page heading for the
group footer pages from the detail section's Format event.
The page header events don't have a way to determine that
the next section will be a group footer, but it's easy to
figure out when you're on the last detail in a group.

Add a text box named txtDetailCounter to the detail section.
Set its control source expression to =1 and its RunningSum
property to Over Group.

Add another textbox named txtTotalDetails to the group
header section and set its control source expression to
=Count(*). (You can make the group header invisible if you
have no other use for it.)

Now, you can add code to the detail section's Format event
to manipulate the items in the page header section:

If txtDetailCounter = txtTotalDetails Then
' last detail in group
Me.txtHdrtextbox1.Visible = False
. . .
Me.txtHdrtextbox2.Visible = True
End If

The group footer's Format event will, of course, have to
reverse the visibility of the page header controls for the
next group.
 
Back
Top