Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Growth percents
Message
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01103467
Message ID:
01103530
Views:
16
create cursor mycursor (year i,saled i, growth I)

...
SELECT MyCursor 
GO TOP    && Important
m.lnOldYear = Saled
SCAN
    REPLACE growth WITH ((Saled- m.lnOldYear)/m.lnOldYear * 100)
    m.lnOldYear = Saled
ENDSCAN
BROWSE NORMAL
Two comments;

1) the SELECT myCursor is not necessary above as the CREATE CURSOR will do that in the current work area
2) The GO TOP is not only not Important, it is not needed at all as SCAN always starts at top unless you use the WHILE or REST clauses
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform