Aggregate values for columns

Josep jmyepes at mac.com
Tue Jun 23 10:10:26 EDT 2009


Hi Trevor,

The code is:

On FillInData

...
<Perform some Col operations>
...

 set itemdel to tab
   put the uSumTotal ["Col 9"] of me into theTotal
   --set the text of field "f_importe_base1" to the uSumTotal ["Col 9"] of
me
   set the text of field "f_importe_base1" to the item 1 of theTotal
   set the text of field "f_importe_base2" to the item 2 of theTotal
   set the text of field "f_importe_base3" to the item 3 of theTotal
   set the text of field "f_importe_iva1" to the item 1 of theTotal * (fld
f_iva1 / 100)
   set the text of field "f_importe_iva2" to the item 2 of theTotal * (fld
f_iva2 / 100)
   set the text of field "f_importe_iva3" to the item 3 of theTotal * (fld
f_iva3 / 100)
   set the text of field "f_importe_rec1" to the item 1 of theTotal * (fld
f_rec1 / 100)
   set the text of field "f_importe_rec2" to the item 2 of theTotal * (fld
f_rec2 / 100)
   set the text of field "f_importe_rec3" to the item 3 of theTotal * (fld
f_rec3 / 100)
   put the item 1 of theTotal + fld f_importe_iva1 + fld f_importe_rec1 into
tSubT1
   put the item 2 of theTotal + fld f_importe_iva2 + fld f_importe_rec2 into
tSubT2
   put the item 3 of theTotal + fld f_importe_iva3 + fld f_importe_rec3 into
tSubT3
   set the text of field "f_importe_total" to tSubT1 + tSubT2 + tSubT3
   
end FillInData

I need calculate the amounts for the taxes. When the users insert a item I
need calculate the total for the line. Multiply units by product cost, and
update the total for the document with her taxes.
I have three posibles taxes. After call uSumTotal for the col that have the
totals, I perform some others operations and fill the fields.

The question is if this is correct to do in FillInData, in your last post
you confirm that is the good place, and what effect can have in the
performance of the datagrid or the stack.


I really impressed with the performance of the datagrid and the
posibilities. Really good. :) To use or not to use the datagrid in your
projects imho will be determined by the project itself or the funtions that
need implemented. The best way of learn the use and the posibilities is
follow some of the basic samples located and see oneself. I'm sure that you
can discover infinite posibilities of use it to improve your projects. One
real sample is the ScreeSteps application and the intensive use of the
datagrid and Rev.


Salut,
Josep
-- 
View this message in context: http://www.nabble.com/Aggregate-values-for-columns-tp24158600p24166793.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list