Skip to Content
Former Member
Mar 30, 2009 at 01:47 PM

Report based on conditon of previous record


Can anyone help...

I am trying to write a crystal report v9 to report on the next record in the table based upon the outcome of the previous record. For example table1 has 3 fields which I wish to use

Field1; Field2; Field3

1) 11 A Y

2) 25 B N

3) 45 C N

4) 64 B Y

5) 100 D N

I want the report to evaluate each line so that when field 3 is equal "Y" it returns the line below i.e. line 2. When field 3 was equal to N to keep reading down the table until line 4 until the condition was true again and report on line 5 etc. Until the end of the table. Then I wish to group by field 2.