Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula for next value if zero Post Reply Post New Topic
Author Message
CRW2
Newbie
Newbie


Joined: 14 Aug 2009
Location: United States
Online Status: Offline
Posts: 6
Quote CRW2 Replybullet Topic: Formula for next value if zero
    Posted: 04 Sep 2009 at 10:21am
Hi Everybody,
 
I have a situation about a formula I created to pull the last sales price of our inventory which works okay, but what I could not formulate is how to make this formula pull the next sales price if the last one equals zero.
 
Below is the formula thats been used;
 
if {AR_InvoiceHistoryHeader.InvoiceDate}=Maximum ({AR_InvoiceHistoryHeader.InvoiceDate},({@Remove "-G"})) then
formula = {AR_InvoiceHistoryDetail.UnitPrice}
else
formula = 0
end if
 
Thanks in advance.
 
CRW


Edited by CRW2 - 04 Sep 2009 at 10:22am
Thank you

CRW2
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 07 Sep 2009 at 4:58pm
try using Next({AR_InvoiceHistoryDetail.UnitPrice})

Jyothi
IP IP Logged
CRW2
Newbie
Newbie


Joined: 14 Aug 2009
Location: United States
Online Status: Offline
Posts: 6
Quote CRW2 Replybullet Posted: 08 Sep 2009 at 8:05am

Thanks for the input, the selection expert and the maximum summary gave me the exact information I needed.

 
Again Thanks.
 
CRW2
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.016 seconds.