Report.CreateTotals(Array of [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(Vars: Array of [Decimal])

Parameters

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

Vars
 Type: Decimal
Array of variables for which the system will maintain individual totals.

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);  

See Also

Report Data Type
Get Started with AL
Developing Extensions