Formula syntax in the Report Writer

Formula syntax in the Report Writer

A formula consists of operands, operators, numbers and parentheses.

Example (Procentage variance):
('001'-'002')*100/'001'

Operator Example
ABS Absolute value ABS(-10) = 10
DIV Interger division 10 DIV 3 = 3
MOD Remainder of whole number division 10 MOD 3 = 1
SQRT Square root SQRT(9) = 3
INT Truncation to integer INT(3.9) = 3
TRUNC Truncation to integer TRUNC(3.9) = 3
ROUND Rounding ROUND(3.5) = 4
EXP Exponential function EXP(1) = 2.71828
LOG Logarithm LOG(10) = 2.3025
SIN, COS, TAN Trigonometric functions (angle of an arc)

Example (Variance of absolute values):
ABS('001') - ABS('002')

IF c1 THEN f1 ELSE f2
where c1 is comparison condition, f1 and f2 are formulas.
In comparison conditions the following operators are permitted:
< less than
<= less than or equal to
> greater than
>= greater than or equal to
= equals

Example (Determine maximum value):
IF '001' > '002' THEN '001' ELSE '002'

Note