Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Columns total
Message
 
 
To
21/03/2006 08:58:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01106199
Message ID:
01106234
Views:
21
>Hi
>If I have cursor with few fields (The columns names and count is not permanent but data type always is integer).
>The first column name is permanent.
>I want to add column to total the values in all columns for each line without the first column (second column and onward).
>Help plesae
in the grid's Init:
local lcControlSource

lcControlSource = ""

for lnI = 2 to this.Columns.Count - 1
    lcControlSource = " + " + this.Columns[m.lnI].ControlSource
next

lcControlSource = substr(m.lcControlSource,4)

this.colTotal.ControlSource = m.lcControlSource
This if of the top of my head, so untested.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform