Need to include multiple records in a report

C

Chas Large

Hi All,
Happy new Year to all and thanks for all the help you have all sofar given.
I have a dB where I have 2 Tables - Customers and Products. For a Repairs
Workshop.
I need to have a report where it details
Customer Details at the top then lists
Products
Products
Products
etc
The dB is set up and works OK. I have a form with sub form to show Customer
on the form and Products on a sub form
Both Tables are linked and there are individual ID numbers for Customer and
Product.
So Customer 123 can have product 345 & 346 & 347 etc. All numbers relate
individually to Customer & Product
I have created a Query to list all items and can use this to produce a
report as above but can only show the first Product.
How can I get the Query/Report to list all products for the given customer?
I have looked through the Group lists and can find several similar questions
and answers but they all seem to involve SQL or Filters which I just don't
understand (Yet) But am learning and would apreciate any advice.
Cheers
Chas
 
C

Chas Large

Hey Guys,
I found the answer myself.
I created a report with the Wizard and it produced a Sectioned Report where
the Customer details were at the top and a seperate section for the Products.
If multiple products are there it lists them all.
I did some tweaking to the format and got my Report Just Right!
How it did this section Detail I don't know as I could not find a way to
Insert a detail Section into a report I already made. Still there we go.
 
S

SA

Chas:

Just like you created your sub form, you should do this as a report with a
sub report. The main report would include only the customer's data. The
sub report would include all the products sold/repaired with a field
included for the customer id.

When you drag the sub report onto the main report, set the Link Master /
Link Child properties of the sub report to be based on the customer ID.

You can put the customer's information in the main report in the detail
section and add the sub report after that; then add a page break control
after the sub report to have it print the information for each customer on
one page.

Last if you want to filter the report for a single customer you can simply
issue and open report call specifying the customer ID as in:

DoCmd.OpenReport "MyCustomerRpt", acViewPreview, , "[CustomerID] = 123478"

HTH
 

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