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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum value as selection filter 3

Status
Not open for further replies.

dhamspec

Programmer
Jan 29, 2002
13
CA
Hi, I am new to Crystal and have been looking around today but haven't been able to find an answer to this. I am want to use a maximum value as a selection criteria. Ie output has multiple records based of accounts for all purchases, IE

Acct Number Purchase Date Purchase Id Purchase Item
55555 1/13/1999 231 Golf balls
55555 7/26/2001 498 Golf Clubs
55555 6/30/2004 598 Golf Tees

What I want it to select is only

Acct Number Purchase Date Purchase Id Purchase Item
55555 6/30/2004 598 Golf Tees

Based either on Most recent purchase date or highest purchase ID number.

Can anyone help
Thanks, D

 
You should at least post your software version with any technical post.

Group by the Account Number, and then go into the Report->Edit Selection Formula->Record and use:

{table.date}=maximum({table.date},{table.group})

-k
 
Hi sorry I am using Crystal v 9. When I added the formula as indictated above I get an error message saying "this function cannot be used because it must be evaluated later
 
This formula belongs in a different area, and I'm sure SynapseVampire just made a typo. Go to report->edit selection formula->GROUP and enter it there. This also assumes you have a group on {table.acct}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top