SETROWOP

Defines on-the-fly calculations for a named row created with CALCULATE ROW.

This command determines the calculation for the calculated row specified in rowCalcName. The following table lists the operators you use for the operation in the command:

Table 4-4 Operators for CALCULATE ROW

Operator Operation
+ Addition
- Subtraction
* Multiplication
/ Division
% Percentages
OFF Turns off the calculation

The addition operator, for example, sums all values in all rows output while the operation is on. The result in the calculated row may be printed with PRINTROW at any time. You may only use a single operator per calculated row. Before using the SETROWOP command, you must define the row name with the CALCULATE ROW command, or with SAVEROW or SAVEANDOUTPUT. Refer to the CALCULATE ROW command for more information on its ability to set the row operator.

If an operation is not specified, the default is + (add).

Syntax

{ SETROWOP "rowCalcName" [ operation ] }

Parameters

rowCalcName

Named row, in double quotes, to which SETROWOP applies.

operation

You can use any valid row calculation expression.

SETROWOP accepts the same mathematical operators as CALCULATE ROW. In addition, SETROWOP accepts the OFF operator, which turns off row operations for rows that follow.

Notes

SETROWOP performs unary operations on the row or rows that follow. SETROWOP "rowCalcName" OFF turns off operations on subsequent rows.

Example

See the examples for CALCULATE ROW.