Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: minimum and maximum date condition Post Reply Post New Topic
Author Message
sem.live
Newbie
Newbie


Joined: 20 May 2010
Location: Singapore
Online Status: Offline
Posts: 5
Quote sem.live Replybullet Topic: minimum and maximum date condition
     Posted: 14 Jul 2010 at 12:24am
help me to show data on column1 where condition on column2 is date?
col1_int        col2_date
100              8/2/2009
210              8/1/2009
160              8/5/2009
125              8/8/2009

I want show my data in col1_int where condition on col2_date is maximum date and else minimum date?

i was try this code:
IF {table.col2_date}=Minimum ({table.col2_date}) THEN
col1_int

but if i create same code use maximal then one of that be a zero value.

thaks all Wink%20...%20Shift+R%20improves%20the%20quality%20of%20this%20image.%20Shift+A%20improves%20the%20quality%20of%20all%20images%20on%20this%20page.


Edited by sem.live - 14 Jul 2010 at 12:25am
God Bless You
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 14 Jul 2010 at 1:14am
i just make a test w/ your data.
 
I create formula to handle DateMin and DateMax.
DateMin=minimum(col2_date)
DateMax=NthLargest(1,col2_date)
 
then create another formula to compare the date and put Col1.
xcheck=> if col2_date=DateMin then col1_int
ycheck=> if col2_date=DateMax then col1_int
 
 
and wa...laaa.. it work.
 
 
hope it help.
 


Edited by Emir_W - 14 Jul 2010 at 1:22am
Emir W
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum