# 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
```al
 Report.CreateTotals(var Var1: Decimal [, var Var2: Decimal,...])
```
## Parameters
Report
Type: report-data-type
An instance of the report-data-type data type.
Var1
Type: ../decimal/decimal-data-type
Variable for which the system will maintain the total.
*[Optional] Var2*
Type: ../decimal/decimal-data-type
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);
```
## Related information
report-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-createtotals-decimal-decimal-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/reportinstance-createtotals-decimal-decimal-method/
