Page Headings on Sub Reports



On another thread Chris asked how to get Sub Report headings on each page of
a report. Allen Browne provided the answer I have repeated below. I have used
Allen's suggestion on a report but found that it results in the sort order of
my sub-report data being reversed. Going back to the source query for my
report data and specifying the sort sequence has no effect on the result.

Can anyone suggest what I can do to 'regain' control of the order in which
the report data is displayed? Any assistance would be appreciated.

Allen Browne's answer from the other thread:

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:

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.)




I just tried something else and found that the use of the expression =0 was
the cause of the problem. By selecting the control that that is used to sort
the report data in the Sort And Grouping Box I was able to restore the sort

Indirectly Allen thanks for your help!!

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