CREATETOTALS Function (Report)
Maintains totals for a variable in C/AL.
Important
This function will be deprecated in a future update and we recommend that you do not use it.
Syntax
CREATETOTALS(Var1 [, Var2] ,...)
Parameters
Var1, Var2, …
Type: Decimal
Remarks
CREATETOTALS maintains group and grand totals. The totals can be printed by placing controls that have the variable or variables that are the arguments of CREATETOTALS as their source expressions in the appropriate sections. The group totals are printed in GroupFooter sections, and the grand totals are printed in Footer sections.
Note
For RDLC reports, CREATETOTALS initializes program variables, but not record fields, hence a CREATETOTALS(MyVar)
can be replaced with or compared to CLEAR(MyVar)
or MyVar := 0
;
Example
This example shows how to use the CREATETOTALS function to maintain totals for the two variables Amount and Quantity.
CurrReport.CREATETOTALS(Amount, Quantity);