Skip to main content
Version: 20 R7 BETA

QR SET TOTALS DATA

QR SET TOTALS DATA ( area ; colNum ; breakNum ; operator | value )

ParameterTypeDescription
areaIntegerReference of the area
colNumIntegerColumn number
breakNumIntegerBreak number
operator | valueLongint, StringOperator value for the cell or Cell content

This command is not thread-safe, it cannot be used in preemptive code.

Description

Note: This command cannot create a subtotal.

List Mode

The QR SET TOTALS DATA command sets the details of a specific break (total or subtotal).

area is the reference of the Quick Report area.

colNum is the column number of the cell whose data is going to be set.

breakNum is the number of the break whose data will be set (subtotal or grand total). For a Subtotal, breaknum is the sort number. For the Grand total, breaknum equals -3 or the constant qr grand total of the QR Operators theme.

operator is an addition of all the operators present in the cell. You can use the constants of the QR Operators theme to set the value:

ConstantTypeValue
qr averageLongint2
qr countLongint16
qr maxLongint8
qr minLongint4
qr standard deviationLongint32
qr sumLongint1

If operator is 0, there is no operator.

value is the text to be placed in the cell.

Note: Operator/value is mutually exclusive, so you either set an operator or a text.

You can pass the following values:
- # for the value that triggered the break or subtotal
- ##S will be replaced by the sum.
- ##A will be replaced by the Average.
- ##C will be replaced by the Count
- ##X will be replaced by the Max.
- ##N will be replaced by the Min.
- ##D will be replaced by the Standard deviation.
- ##xx, where xx is a column number. This will be replaced by that column’s value, using its formatting. If this column does not exist, then it will not be replaced.

Cross-table Mode

The QR SET TOTALS DATA command sets the details of a specific cell.

area is the reference of the Quick Report area.

colNum is the column number of the cell whose data is going to be set.

breakNum is the row number of the cell whose data is going to be set.

operator is an addition of all the operators present in the cell. You can use the constants of the QR Operators theme to set the value (see above).

value is the text to be placed in the cell.

Here is a depiction of how the parameters column and break have to be combined in cross-table mode:

Supported Types of Data

The types of data that you can pass are of two basic kinds:

  • Title
    A title is passed through the parameter value. The value is actually a string and can be passed only for the following cells: colNum=3 breakNum=1 and colNum=1 breakNum=3.
  • Operator
    An operator or a combination of operators (as described above) can be passed for the following cells:
    colNum=2, breakNum=2
    colNum=3, breakNum=2
    colNum=2, breakNum=3
    Please note that these last two values affect the cell (Column 3; Row 3) as well. If a computation is defined in the cell (Column 2; Row 3), the contents of this cell (Column 2; Row 3) always define the contents of the cell (Column 3; Row 3).

If you pass an invalid area number, the error -9850 will be generated.
If you pass an invalid colNum number, the error -9852 will be generated.
If you pass an invalid breakNum number, the error -9853 will be generated.

See also

QR GET TOTALS DATA