Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Value of preceding fields

Status
Not open for further replies.

Bruni007

Technical User
Joined
May 29, 2006
Messages
20
Location
CA
Hi,
Can anyone tell me if there is a way to evaluate preceding fields, not only the one last record with the Previous() function...
I need to know the value of the 4th preceding field by example
How can I do that?
 
You'd need to keep track of it in variables.

whileprintingrecords;
numbervar value v4;
if remainder(recordnumber,2) = 0 then
v4:={table.field}

That would store the value of every 4th row. You can't say go back 4 rows, and I suspect that there's a better way of doing what you need.

I suggest that you put a little more effort into your post:

Crystal version
database/connectivity
Example data
Expected output

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top