Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating in a scan...endscan
Message
From
01/10/2006 20:12:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01158457
Message ID:
01158465
Views:
15
Do you really need this information in a cursor?

Quite often, you need this kind of information in a report; if that is the case, I would just use report variables to do the calculations.

>Hi All,
>
>i've below records on my cursor
>
>rcno debit credit remainder
>==== ===== ====== =========
>1 0 100 0
>2 0 200 0
>3 100 0 0
>4 200 0 0
>
>i'want to calculate and replace for remainder field for the first record
>
>0 - 100 = -100
>
>then
>
>2nd and others shoulbe
>
>* first remainder value + debit - credit
>
> 2nd -100 + 0 - 200 = -300 )
> 3rd -300 + 100 - 0 = -200
> 4th -200 + 200 - 0 = 0
>
>how can i do this in a scan..endscan or for next loop ?
>
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform