CREATETOTALS Function (Report)

Maintains totals for a variable in C/AL.


This function will be deprecated in a future update and we recommend that you do not use it.


CREATETOTALS(Var1 [, Var2] ,...)  


Var1, Var2, …
Type: Decimal


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.


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;


This example shows how to use the CREATETOTALS function to maintain totals for the two variables Amount and Quantity.

CurrReport.CREATETOTALS(Amount, Quantity);  

See Also

Report Data Type