Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SubReport is Repeating Values, Only For Some?

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I searched the threads, but did not find this particular problem.

I have a main report. It is based on a query as follows:

Customer Table

1 to many relationship with

Orders table

In the main report, I put the customer name and address, and the Order Date from the Orders table.

Now, I also have a subreport.

This is based on a table called
Order Types.

They are the types of orders that a given customer is to receive. Another one to many with Customer's table.

I line the subreport up with the fields on the main report, so that it will look like this:

Customer Order Date Order Types
Mary Smith 1/1/2007 A type
B type
D type
John Doe 2/2/2007
Amy Clark 3/3/2007 B type

It works for all customers that have 1 order type, or no order types. I get to a customer that has multiple order types. It lists the three types, then it list them 3 more times. Then the next customer is listed. It looks like this:

Customer Order Date Order Types
Mary Smith 1/1/2007 A type
B type
D type
A type
B type
D type
A type
B type
D type
A type
B type
D type
John Doe 2/2/2007
Amy Clark 3/3/2007 B type

Why is this happening?

:-(

Thank you for any help you may be able to give.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
You are getting this behavior brcause these are the records your query returns. Can you post the SQL from the query here? Probably just need to change the join properties...

Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.
 
Thank you for your response, but I ended up ripping it apart because the boss decided to change the fields they wanted. The odd thing is that I had to create a new subreport, with similar purpose, same linking (PID of main report sql to FID to subreport sql) and two fields instead of one. That works!

Oh well, I will just be happy that I can leave that for another day.

Thank you again.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top