Help with Report Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to print a report, in which a group record relates to one or several details:
Record A -> Record B
I can very easily create a report like this:
Record A header: aaaa aaa a
Detail: bbbb b
bbbb b

However, almost always there will be 0 or 1 B records for each A record, and there is room on the line to put the records side by side. I would like to arrange the report like this:

aaaa aaa aa bbbb b
bbbb b

so that normally there will only be one line per Record A except in the rare cases of two or more B records

How do I do this

Thanks for helping
Regards, Robert Barnes
 
The easiest method is to place aaaa aaa aa in the detail section and set its
Hide Duplicates property to Yes.

--
Duane Hookom
MS Access MVP
--

Robert Barnes said:
I want to print a report, in which a group record relates to one or several details: -
Record A -> Record B.
I can very easily create a report like this: -
Record A header: aaaa aaa aa
Detail: bbbb bb
bbbb bb

However, almost always there will be 0 or 1 B records for each A record,
and there is room on the line to put the records side by side. I would
like to arrange the report like this: -
aaaa aaa aa bbbb bb
bbbb bb

so that normally there will only be one line per Record A except in the
rare cases of two or more B records.
 
I tried that, but there are two problems
Firstly, the "aaaa" values don't appear when they are the same as the record above, even when it's a new record. The logic should be controlled by the unique record key: if this is different I want all the aaaa values to appear even if they are the same as the line above
Secondly, I am summing one of the aaaa values: if there are two B records then I get the aaaa number added in twice

Cheers, Robert
 
Your original question suggest there are "0 or 1 B records for each A
record". Does this mean there are instances where there are no B records
that match an A record? If so, how would this display? Are there subreports
involved in this or are the tables combined in the record source of the
report?

Maybe you should enter about 6-10 records of various values and show us how
you want this to appear. If you want to do some summing, make sure you
include this.

--
Duane Hookom
MS Access MVP
--

Robert Barnes said:
I tried that, but there are two problems.
Firstly, the "aaaa" values don't appear when they are the same as the
record above, even when it's a new record. The logic should be controlled
by the unique record key: if this is different I want all the aaaa values to
appear even if they are the same as the line above.
Secondly, I am summing one of the aaaa values: if there are two B records
then I get the aaaa number added in twice.
 
I would remove the "B" records from the report and place them in a
subreport. The subreport would be linked on whatever field using the Link
Master/Child properties.

--
Duane Hookom
MS Access MVP


Robert Barnes said:
Thanks for your help Duane. I'm sorry if my efforts to simplify the
problem description actually made things more obscure. Anyway, here's a
more complete description.
I've saved a sample page of the report as html and stored it at: -
http://www.robertb.co.nz/receipts.htm

Referring to this sample: -

The columns
Amount, Type, Bank, Bank Branch, Pmt Date, and Entered at
are data about a single Receipt (Cheque or direct credit). This is the
section that I called "Record A" before. Actually its a query, but the
details of this don't matter.
The three columns to the right: -
Job, Allocation, Amount
allocate the receipt. Normally there is a single allocation, often there
is none, but theoretically there could be any number. For one of the
receipts I've created two allocations in my test data (see the 4th receipt).
The report is currently driven by a query joining the receipt and
allocation (my "record A and record B" in the previous explanation. I have
set up the report with control breaks on Customer and Receipt ID (not
printed), and the receipt data is printed on the subheading.
There are two problems with the report
Firstly, the customer total is incorrectly calculated: it should be
$132,099.78. The $10 receipt that has two allocations has been counted
twice.
Secondly, I'd like to move the first Allocation line up, so that in the
case where there are 0 or 1 allocations only a single line is needed for
both the receipt and its allocation.
 
Back
Top