Multiple Subreports each w/own Page Header

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

Guest

I have 10 subreports on one report, but can't get their individual (and
different) page headers to work. The problem is some reports span many
pages, but I can't get their column headings to show.
 
As you have found, page sections don't display in subreports. You can create
fake page headers by creating a primary sorting and grouping section on a
constant like:
=1
Display the Group 1 header section and set its Repeat Section property to Yes.
Use this section as you would a Page Header.
 
franklinbukoski said:
I have 10 subreports on one report, but can't get their individual (and
different) page headers to work. The problem is some reports span many
pages, but I can't get their column headings to show.


The main report is in charge of page related stuff,
subreports ignore page header/footer sections and the Page
event.

You can get a near equivalent effect by adding a top level
group header (View menu - Sorting and Grouping). Set the
group's Field/Expression to a constant (e.g. =1 or ="Fake
Page Header"). Then move your column heading stuff to the
group header section and set its RepeatSection property to
Yes.
 
You guys ROCK!

Marshall Barton said:
The main report is in charge of page related stuff,
subreports ignore page header/footer sections and the Page
event.

You can get a near equivalent effect by adding a top level
group header (View menu - Sorting and Grouping). Set the
group's Field/Expression to a constant (e.g. =1 or ="Fake
Page Header"). Then move your column heading stuff to the
group header section and set its RepeatSection property to
Yes.
 
Is there a way to have the footer show up on every page as well? Doesn't
appear to be a Repeat property for the footer.
 
No. A group footer only appears at the end of the group so
there is nowhere for it to repeat. We're being devious when
faking a page header with a group header, but that simple
fakery doesn't extend to an equivalent for a group footer.

A more direct, but a ;ittle more complex, approach is to use
the main report's Page footer section. If the main report
is not using it's page footer section, then make it
invisible and set it up with the appropriate text boxes.
Use the subreport's report (or the repeat group) header
section's Format event to set the control's values and make
the main report's page footer visible:
With Me.Parent
.thistextbox = Me.something
.thattextbox = Me.whatever
. . .
.Section(4).Visible = True
End With

If the main report is using it's page footer, add the
controls for the subreport and make them invisible. Then
instead of making the entire section visible, set the main
report usual controls invisible and the subreport text boxes
visible:
With Me.Parent
.maintextboxA.Visible=False
.maintextboxB.Visible=False
. . .
.thistextbox = Me.something
.thistextbox.Visible = True
.thattextbox = Me.whatever
.thattextbox.Visible = True
. . .
End With
 
Back
Top