Optional functions may be used with commands "scan", "scanentry", "scanfooter", "endscan". 

These functions are SUM, CTN, CTS. You may use these functions to sum or count values of data fields and report variables. Common format is:
 
\scancommand, ...., function1(source, destination)...functionN(...)\

Each function is called when the report generator gets corresponded scan command. 

The first argument in each function is "source" data field or report variable. Result of each function is stored in a report variable, which is "destination" argument. Function may have noreset option - in this case its result will not be initiated with zero value if function was computed at least once. If result variable does not exists it will be created automatically.

Besides SUM, CTN, CTS functions you may call user defined functions. User defined functions are created through the UDFList component property.

In addition function VAR may be used in scan command: \scan(a), var(n1), user_function(n1)\.

Next topic: Sum function