Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Select date using if then else Post Reply Post New Topic
Author Message
trub
Newbie
Newbie
Avatar

Joined: 16 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote trub Replybullet Topic: Select date using if then else
    Posted: 16 Aug 2011 at 4:46am
Hi,
 
I am trying to show a date an item was last used from our inventory, the last time before it was ordered.
 
I can generate the date for this so long as no subsequent usage has occured since the order date simply by stating IF {usage date}<{Order date} Then {usage date}
 
but this gives blanks where there has been subsequent usage.  In fact I want to see the previous issue, closest to the order date, so I add (to the above) "Else" but then get stuck as effectively I then ask it to do the same again.
 
The data looks something like this:
 
Item  Ordered    Last Used   
a          10-Aug      11-Aug
a          10-Aug       9-Aug
b          10-Aug      14-Aug
b          10-Aug       1-Aug
 
I would be looking to get the lines in bold text returned.  Tried everything I can think of and have been able to search on t'web, but running out of ideas.
 
Shame to lose it on the last little obstacle though.  Many thanks in anticipation of some help?
 
 
 
 
 
trub
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 16 Aug 2011 at 5:15am
create a formula maximum(lastused) and you will get the most recent use date
make sure you check off the boxes
file
report options
check null value boxes to pull in all records
sharona
IP IP Logged
trub
Newbie
Newbie
Avatar

Joined: 16 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote trub Replybullet Posted: 16 Aug 2011 at 5:22am
Originally posted by sharona

create a formula maximum(lastused) and you will get the most recent use date
make sure you check off the boxes
file
report options
check null value boxes to pull in all records
 
Ah, thanks, but I don't necessarily want the last used record.  It is the last used record before the order was placed.  It is highly likely (well about 80% of my results) that further usage will occur before the order is replenished, so I need to monitor the time between the usage occurring and the order being placed, to order receipt, whilst taking out any subsequent usage.
 
thanks
trub
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.