Use the expression to obtain value from the previous record without specifying the field name to obtain the value in the next record. The specification of the data types are shown in 4.4.
It is possible to calculate total by combining if function with top() function. The cumulative calculation on the amount field is shown below.
$ mcal c='if(top(),${amount},${amount}+#{})' a=cumulativeAmount
Data Type |
Format |
Example |
Numeric( |
#{} |
#{} |
Character String( |
#s{} |
#s{} |
Date( |
#d{} |
#d{} |
Time( |
#t{} |
#d{} |
Boolean( |
#b{} |
#b{} |