cancel
Showing results for 
Search instead for 
Did you mean: 

Next function not working for first two records

Former Member
0 Kudos

Hi all,

I have scenario where I'm comparing two billing docs and if they are equal and the net billing of second record is 0 and the retainage of second record contains some value then move the retainage to the first record.

I've built the above formula for retainage and its working well except for the first two records. This is happening for all the customers.

numbervar t;


if ({ZAR_VRM30_Q007.Document Number}=next({ZAR_VRM30_Q007.Document Number}) and next({ZAR_VRM30_Q007.Net Billing})=0
and next({ZAR_VRM30_Q007.Retainage based on Currency Type})<>0)
then
(
t:=next({ZAR_VRM30_Q007.Retainage based on Currency Type});
)

else
(
t:={ZAR_VRM30_Q007.Retainage based on Currency Type};
)

This is the screenshot of output.

Can someone tell me if this is the behaviour of next function?

Thanks,

John

Message was edited by: John Moses

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi John,

What version of Crystal Reports for Enterprise are you using?

I tested this report (on CR4E SP04) and it works fine. The formula shows the correct retainage values on the repeating records.

Why so many duplicate posts ?

- Abhilash

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces