What are formulas

[Top]  [Chapter]  [Previous]  [Next]

Formulas are used to calculate totals. TextDynamic only allows numeric formulas. If you need to combine string fields you need to create a new field name which represents the combined value of two physical fields.

 

Inside formulas variables are allowed, i.e. "VARA+VARB". Here the event OnReadFormulaVar is used to retrieve the value which should be inserted instead of VARA and VARB.

 

Some special formulas are allowed at certain places:

 

If a group variable uses the LoopFormula "add(field(fieldname),formula)" first the event OnFieldGetText will be triggered for "fieldname" and then the formula will be evaluated. The result and the text retrieved for the field will be added to the element list of the variable. This list can used later to create a chart. The formula can be also written as add(fieldname,formula). "formula" must be a string constant.

 

Fields can also read out the value of a group variable of a previous, higher level group. To do so specify the name of the group variable in the formula using "var(varname)".


[whatareformulas.htm]    Copyright © 2007 by WPCubed GmbH