Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem in GRID having calculate column
Message
From
28/01/2007 17:16:11
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem in GRID having calculate column
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01189942
Message ID:
01189942
Views:
71
Hello comunity

i have this code to make a calculation on my grid form changing the controlsource .
STORE "" TO clname
FOR EACH myform IN _Screen.forms
IF UPPER(myform.name)="SFT"WITH myform.Pageframe1.Page1.Cont1.Grid1
FOR i=1 TO .columnCount
IF UPPER(.Columns(i).ControlSource)="FI.U_VALHUM"
clname=.Columns(i).name
.Columns(i).ControlSource = ('((0+fi.u_nospeso-fi.u_VLDscemb)*fi.u_hum)/100')
exit
ENDIF
NEXT i
EXIT
ENDWITH
ENDIF
NEXT myform
The original controlsource of my column is a table field FI.U_VALHUM, well , if i use this code effectively i have on my column the result, but, because i change the ControlSource when i save my invoice and i close the invoice form , when a reopen my form the calculate value has dissapear , i think that because the controlsource of my calculation column don´t refer to my table field FI.U_VALHUM and saving the invoice this table field has never hold the calculate value on the table.

I don´t know if i have another possibilities to save the calculate value on my table but using this code to calculate on my column :
('((0+fi.u_nospeso-fi.u_VLDscemb)*fi.u_hum)/100')

I think if i don´t change the control source, but i use .Value propertie i can do that, my problem is how can i do this.

MAny thanks
Luis Santos
Next
Reply
Map
View

Click here to load this message in the networking platform