Page Headings in Sub Reports

C

Chris W

Hi All

I have an unbound main report with 4 sub reports within it. Each sub report
is bound to its own data source and can produce 0 or many rows of data. I am
trying to format the sub reports so that if it returns more than one row of
data, the sub report page headings are repeated.

I cannot find a way of doing this - the page header does not appear to be
used when the report is as a sub report - only the report header (which means
I get it once only!)

Does anyone have any ideas, suggestions as to how I can make this work?
 
A

Allen Browne

You're right: a report's page header/footer is derived from the main report,
so anything in the subreport is ignored.

You can work around this by creating a group header in the subreport, and
telling it to repeat at the top of each page.

1. Open the subreport in design view.

2. In the Sorting And Grouping box, enter an expression such as:
=0

3. Right-click the new section with the "=0 Header" heading, and choose
Properties. Set the Repeat Section property to Yes.

The new group header is the same for all records (so only appears at the
very top like a Report Header), but the Repeat Section setting causes Access
to repeat it at the top of each page (like a Page Header.)
 
C

Chris W

Allen

What a star! It works like a dream - thank you very much. If I get to be
1/10 as good as you guys, I will consider myself to be lucky

--
Regards
Chris


Allen Browne said:
You're right: a report's page header/footer is derived from the main report,
so anything in the subreport is ignored.

You can work around this by creating a group header in the subreport, and
telling it to repeat at the top of each page.

1. Open the subreport in design view.

2. In the Sorting And Grouping box, enter an expression such as:
=0

3. Right-click the new section with the "=0 Header" heading, and choose
Properties. Set the Repeat Section property to Yes.

The new group header is the same for all records (so only appears at the
very top like a Report Header), but the Repeat Section setting causes Access
to repeat it at the top of each page (like a Page Header.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top