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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loop Question

Status
Not open for further replies.

bigz60

Technical User
Apr 18, 2007
40
US
Hello. I have never written a loop formula befor in CR 9.

I am working with a report that lists all of the checks written for a particular month and the various details.

My system sometimes skips check number out of the blue, I don't know why.

I would like to do something similar to a bank statement, and compare each check number to the previous, and if it has been incremented by one, display nothing, but if the checks have been incremented by anything other than 1, display a "*".

I am assuming I will need some sort of for loop, or an array. I am not sure where to start.

Thanks in advance.
 
All you need is a formula field that sits next to the check number field that reads like the following:

if previous ({CheckNo.Fieldname}) = ({CheckNo.Fieldname} -1 ) then "" else "*"

Assuming the CheckNo field is a number field, this should work and only display the "*" when out of sequence. If your field is String type, you will need to convert using "ToNumber" function.

JC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top