Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Get Previous record from Running Total Post Reply Post New Topic
Author Message
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Topic: Get Previous record from Running Total
    Posted: 28 Sep 2017 at 12:01pm
I am using CR 2013. My Goal is to isolate for any records where a formula was reset based on a running total calc. I wanted to apply a formula that said 'when value in previous row is greater than value in current row, exclude, else include. Below in bold is the record I am trying to isolate for:
EeID     #RTotal             Formula           
1234     1,851.34     1,851.34          
1234     1,924.54     1,924.54          
1234     1,998.49     1,998.49          
1234     2,071.59     2,071.59          
1234     2,132.69     52.69     Display this record

I've tried the following formula:
If previous({@Formula}) > {@Formula} then "Exclude" which gives the following error message: "This field has no previous or next value".
Any other suggestions on how to isolate for the reset record would be great. Thanks!
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 02 Oct 2017 at 4:56am
You cannot do a previous on a formula. Records only.  It sounds you may need a variable (or two) to store the previous row value.  Then use it for comparison purposes and displaying the result.
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.030 seconds.