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!

Max date selection 1

Status
Not open for further replies.

apples

IS-IT--Management
Mar 28, 2001
15
US
Hi, I have to select records based on the 'latest' effective date only. In sequel the 'max' date option is used. How do I select records that only have the latest date?
Thanks
Sonia
 
Use the Group selection formula

{MyTable.Date} = Maximum(MyTable.Date}

HTH


Gary Parker
MIS Data Analyst
Manchester, England
 
I am in need of adding a MAX(date)check in my existing record-selection expert. I have looked at the many examples in tek-tipos, but have found none which will work for me. My select-expert is already doing record-selection based upon record-types, etc.

HOW do I add a selection to this existing select-expert for a MAX(date) {trying to locate the record with the highest value in that date field)???????

Please help!

thanks,
MB
 
Use the Group selection formula NOT the record selection formula.



Gary Parker
MIS Data Analyst
Manchester, England
 
This is a reply to my earlier post regarding MAX(date). I need to do the following and don't know how to accomplish.

DETAILS:
Use select-expert to select records based upon record-type, entry-date, etc.
AND for each of these records selected, there could be several address-records with date-time-stamps.

PROBLEM:
I wish to use the record-select, not only for the individual record selection, but also to find the address-record with the latest date (MAX).

CAN THIS BE DONE? Or am I stuck trying to write a formula?

Please help--thank you MB

 
Try posting technical information:

Crystal version
Database/connectivity
Example data
Expected output

You can use gthe record selection formula AND the group selection formula if that's your concern.

Anyway create the record selction you want, and then group the report by the entity for the address and in the group selection place:

{table.addressdate} = maximum({table.addressdate},{table.groupfield})

This sort of thing would be better served on the database though by creating a View or Stored Procedure.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top