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

current date check

Status
Not open for further replies.

howhowhow

IS-IT--Management
May 2, 2003
4
US
i'm trying to print out a report from a db that has the most recent DATE!

what it returns now is all the dates but i just want the lastest one, i.e. it show's stuff on 4/25 and 4/24, etc..
and all i want is the stuff on 4/25..

i was trying
to do something like:

if date({Activity_Log.Create Date}) = {@date}
then {Activity_Log.Create Date}

@date is just the most recent entry and
({SFTI:_Activity_Log.Create Date}) is what is being
pulled out of the db..

i get a error saying Formula can not be used because
it must be evaluated later, and i tried the executeafter
function as well.

is there a easlier way to just check for the most current
date and print whatever is on that date or is this the way to do it?

thanks
 
Either use a Top N report, or you can limit rows to days date (or go against a parameter) by using something like the following the record selection formula:

{table.date} = currentdate

-k
 
This is called group selection. Add the following in your group selection formula:

{Activity_Log.Create Date} =
Maximum ( {Activity_Log.Create Date} )

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top