CALC()

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Function to perform report calculation


Syntax

CALC(<memvar>, <expN>)


See Also

ACC(), CREATE REPORT, REPORT


Description

The CALC() function evaluates the specified numeric expression <expN>, places the result in the designated accumulator <memvar>. The return value of the CALC() function is the result of the numeric expression <expN>. This function is only valid in report format <.frm> files. The CALC() function should be used in conjunction with the ACC() function. There are 20 accumulators available, which are cleared to zero at the start of the report (REPORT FORM command). The first 10 accumulators are cleared on each sub-total break, and the last 10 are carried through to the end of the report. These accumulators are useful for providing horizontal totaling facilities.


Example

calc(1, acc(1) + order_value)


Products

Recital Server, Recital