Report.CreateTotals(var Decimal [, var Decimal,...]) Method

Version: Available or changed with runtime version 1.0 until version 1.0 where it was deprecated.

Maintains totals for a variable in AL.

Syntax

 Report.CreateTotals(var Var1: Decimal [, var Var2: Decimal,...])

Parameters

Report
 Type: Report
An instance of the Report data type.

Var1
 Type: Decimal
Variable for which the system will maintain the total.

[Optional] Var2
 Type: Decimal
Variable for which the system will maintain the total.

Remarks

Important

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

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.

This method is not supported on client report definition (RDLC) report layouts. In most cases, when you create a layout suggestion for a Classic report layout that uses the CreateTOTALS method, a SUM expression is created instead and no action is required.

Example

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

CurrReport.CreateTOTALS(Amount, Quantity);  

Report Data Type
Get Started with AL
Developing Extensions