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!

Displaying Max value row in groups...

Status
Not open for further replies.

bgravi

Programmer
Jul 28, 2002
15
0
0
US
Hi,
I am trying to do the following:

Please consider this scenario. One table has list of all customers, and another table has all the purchase made by this customers. The two tables are linked by customer id.
Now, I need to present a report listing the most recent purchases of the customers in this format.

Last 30 days-
list of all customers whose last purchase was in this time frame.
Last 30-60 days
List of all customers whose last purchase was in this time frame.

etc...

I need to list only one record per customer( which is the most recent purchase).

How can I do this? I am having difficulty in getting the report to display only the latest purchase. It lists all the purchases done.

Thank you
Ravi
 
Hi,
I would try this way. Define a group for customer and a group-result for maximum(date of purchase) then you could suppress the records which are the date is not equal the max-result. Then you should get only the recent purchase.

I hope you can understand.

Regards,
Ralph
 
Another way to do this would be to sort your records so that the latest purchase is at the top of the group, then drag the appropriate fields in the group header and hide the details section. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top