V
Vayse
Hi
I have a report with several sub report. Each sub report starts on its own
page. In the main report, I have a page heading and footer.
Each sub report deals with a different business section. For the sake of the
example, lets call them Section A, B, C, D and E.
So in rptMain, I'd like the page heading to be 'Section A' when the sub
report is rptSectionA. If the sub report is SectionB, I'd like the page
header to show 'Section B'.
Some of the sub reports are 2 or 3 pages long, so I can't use the report
heading of the sub report.
Any ideas of how I would do this?
Thanks
Vayse
P.S.
I've tried doing through code, setting a global value using the Report Open
of each sub report, and then setting the page header to that global string.
But its not working!
Heres what I have:
' rptMain
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.txtPageTitle = gPage_Heading
End Sub
' rptSubA
Private Sub Report_Open(Cancel As Integer)
gPage_Heading = "Section A - Contractors"
End Sub
' rptSubB
Private Sub Report_Open(Cancel As Integer)
gPage_Heading = "Section B - Employees"
End Sub
The heading will just stay at "Section A - Contractors" throughout.
I have a report with several sub report. Each sub report starts on its own
page. In the main report, I have a page heading and footer.
Each sub report deals with a different business section. For the sake of the
example, lets call them Section A, B, C, D and E.
So in rptMain, I'd like the page heading to be 'Section A' when the sub
report is rptSectionA. If the sub report is SectionB, I'd like the page
header to show 'Section B'.
Some of the sub reports are 2 or 3 pages long, so I can't use the report
heading of the sub report.
Any ideas of how I would do this?
Thanks
Vayse
P.S.
I've tried doing through code, setting a global value using the Report Open
of each sub report, and then setting the page header to that global string.
But its not working!
Heres what I have:
' rptMain
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.txtPageTitle = gPage_Heading
End Sub
' rptSubA
Private Sub Report_Open(Cancel As Integer)
gPage_Heading = "Section A - Contractors"
End Sub
' rptSubB
Private Sub Report_Open(Cancel As Integer)
gPage_Heading = "Section B - Employees"
End Sub
The heading will just stay at "Section A - Contractors" throughout.