I am trying to include/exclude records based upon a value from the previous record.
I have attempted to modify record selection formulas by using Previous() or Next() print state functions but receive error msg indicating that the function cannot be used it must be evaluated at a later time.
Was also thinking of trying to indirectly supress the record with formulas - but feel this would be very convoluded, even if it is possible - trying to avoid creating something that would not be considered good practice or design.
Below is simplified dataset and desired condition. I would expect records from rows 3-5 to be displayed in the report. FYI col x is shown here for clarity it is not present in actual dataset:
x RemQty RemAvail
1 0 26
2 20 6
3 25 -19
4 18 -37
5 29 -66
IF
For x = 1 RemQty(x) >= RemAvail(x) or
For x > 1 RemQty(x) >= RemAvail(x-1) TRUE include record
ELSE exclude record
Thanks in advance for any assistance.