Master/Child what section

C

Clyde

Using Access 2007
As for back as Access 97 I have designed reports with the PageHeader section
containing the Master data and the Detail Section containing the Child data.
And a PageFooter containing more Master Data.
Trying to do a similar report now (Quotes in the PageHeader and Quote Items
in the Detail section) think Order and Order Items if you want.
Linking fields are QuoteNum in both.
Opening this report in report view has ex: QuoteNum 5000 and its data in the
PageHeader (as expected) but the Detail Section contains repeating lines of
QuoteNum 5000 items. Thirty repeats and then the PageFooter.
The link should be correct, the tables are related by QuoteNum. And both
queries for the report have the Number
I am pretty sure the link works because DoCmd OpenReport with a Where clause
of QuoteNum = "5000" will open the report as expected.
Am I missing something easy?
Pardon the wordiness.

Clyde
 
A

Allen Browne

For this kind of thing, you need to use a group header (not the page
header.)

In the Sorting And Grouping pane, choose the QuoteNum field, and set it up
for a group header and a group footer. You will see 2 new sections added to
the report design.

Select the new group header, and set its Force New Page property to Before
Section. This makes each new quote start on a new page.
 
C

Clyde

That worked well. The mysteries go on though. I have many reports, probably
originally designed in A97 and revised many times in A2003 that work just
fine with page header as discussed. But when I went back to those Apps and
tried to repeat, I couldn't. Crazy.
I had revised the report in question and put all data in the DetailSection
(some still in page footer). Copied and modified to your suggestion. Side
by side they look identical in Print Preview. So now I wonder why I cared.
Perhaps as I go I will see a need for Grouping just to get the effect.
Anyway once again thanks for your help.
 
A

Allen Browne

There are cases where there page header/footer gives you unreliable results
(depending on version of Access, and complexity of the report i.e. whether
sections can grow and need to keep together as Access figures out where the
page will break.)
 
C

Clyde

Thanks.
--
Clyde


Allen Browne said:
There are cases where there page header/footer gives you unreliable results
(depending on version of Access, and complexity of the report i.e. whether
sections can grow and need to keep together as Access figures out where the
page will break.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.



.
 

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