Headers on subreports
I'm trying to print the following style of report:
[Main header - first page only]
[sub report header]
[subreport lines]
:
[subreport lines]
-----page break-----
[sub report header]
[subreport lines]
:
[subreport lines]
-----page break-----
[sub report header]
[subreport lines]
:
[subreport lines]
(NB - I'm stopping the main header appearing on all pages except the first
by hooking into the StartPage event)
I've set the PrintBehavior of the sub report to pbChild. The first page
looks OK but the subsequent pages don't have the sub report header.
If I set PrintBehavior to pbSection then I get the sub report header on all
the pages BUT the first page only contains the main header.
I imagine that I could code around the problem by setting up two regions on
the main report header, one for the main header and one for the sub header
and setting them to visible depending on the page I'm showing. But that
seems like a kludge. Is there any way I can get the type of report I want
without doing this?
Thanks for your help.
Keith
[Main header - first page only]
[sub report header]
[subreport lines]
:
[subreport lines]
-----page break-----
[sub report header]
[subreport lines]
:
[subreport lines]
-----page break-----
[sub report header]
[subreport lines]
:
[subreport lines]
(NB - I'm stopping the main header appearing on all pages except the first
by hooking into the StartPage event)
I've set the PrintBehavior of the sub report to pbChild. The first page
looks OK but the subsequent pages don't have the sub report header.
If I set PrintBehavior to pbSection then I get the sub report header on all
the pages BUT the first page only contains the main header.
I imagine that I could code around the problem by setting up two regions on
the main report header, one for the main header and one for the sub header
and setting them to visible depending on the page I'm showing. But that
seems like a kludge. Is there any way I can get the type of report I want
without doing this?
Thanks for your help.
Keith
This discussion has been closed.
Comments
Using the first method you described (Child style subreports). Remove the
main report header band and use the Title band instead. This band by
default will only print on the first page. You can activate the Title band
in the Report menu option of the designer.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Doing that means that I can get rid of the OnStartPage event that I was
using to supress the main headers on all but the first page. However I'm
still not getting the sub report headers on the second and subsequent pages.
I'm using the Title band on the sub report - I've tried the header band as
well but with the same result.
What I'm getting now is :
[Main header - first page only]
[sub report header]
[subreport lines]
:
[subreport lines]
-----page break-----
[subreport lines]
:
[subreport lines]
-----page break-----
[subreport lines]
:
[subreport lines]
The only time I've managed to get sub report headers is with PrintBehavior
set to pbSection but then I don't get any report lines (except for the
header) on the fist page.
Regards,
Keith
report header to main report page) and it now all works perfectly.
Thanks again.
Keith