Skip to Content
0
Former Member
Jul 27, 2012 at 04:05 PM

Moving record column value to previous record column

16 Views

if ({ZAR_VRM30_Q007.Document Number}=previous({ZAR_VRM30_Q007.Document Number})) and
{@Gross billing_1} = 0 and {ZAR_VRM30_Q007.Net Billing} = 0 and {@Cash Receipts} = 0 and {ZAR_VRM30_Q007.Retainage based on Currency Type} <> 0
then


previous({ZAR_VRM30_Q007.Retainage based on Currency Type}) = {ZAR_VRM30_Q007.Retainage based on Currency Type}

Hi ,

I have a scenario where I have to move the current record value to previous record column.

As highlighted in the above screenshot, I'm comparing two records which have same billing doc no and see if the retainage is shown in second record.

If yes, see that second records gross billing, net billing values are 0, then move the retainage to previous record.. In this example: value 141,417.17 should be moved to the previous record leaving its value 0 in the second record.

I tried using if statement to satisfy the condition and its working but I'm not able to assign the retainage value to first record column. Here I'm getting only true and false values.

Please see the code below:

if ({ZAR_VRM30_Q007.Document Number}=previous({ZAR_VRM30_Q007.Document Number})) and
{@Gross billing_1} = 0 and {ZAR_VRM30_Q007.Net Billing} = 0 and {@Cash Receipts} = 0 and {ZAR_VRM30_Q007.Retainage based on Currency Type} <> 0

then


previous({ZAR_VRM30_Q007.Retainage based on Currency Type}) = {ZAR_VRM30_Q007.Retainage based on Currency Type}

Please let me know how to achieve this requirement.

Thanks for all the help!

John

Attachments

crystal 1.jpg (53.4 kB)