Get Previous record from Running Total
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22466
Printed Date: 01 May 2024 at 3:44am
Topic: Get Previous record from Running Total
Posted By: thummel1
Subject: Get Previous record from Running Total
Date 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
|
Replies:
Posted By: kevlray
Date 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.
|
|