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

max dates in a CR

Status
Not open for further replies.

JamesFlowers

Programmer
Mar 23, 2001
97
GB
I have a report that produces this format of data

Val Real_ship Val_valid_from
0.11 20/02/2001 01/03/1999
0.01 20/02/2001 01/01/2001
0.02 20/02/2001 01/02/2001

the record I require is line three (as the Real_Ship is after the Val_valid_from)
I need to select the latest date of Val_valid_from

I have tried maximum(Val_valid_from) and this returns [NEEDS A BOOLEAN].

how do I select the latest Val_valid_from? to return just

Val Real_ship Val_valid_from
0.02 20/02/2001 01/02/2001


Many Thanks in advance

James Flowers
 
(Val_valid_from) = maximum(Val_valid_from)

This goes in the GROUP selection formula.

It will still pull all three records (and they will also get into the totals unless you use running totals), but it will only print the max record. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top