Creates a new total.
Syntax 1
expression.AddTotal(GroupingDefName, GroupingFieldName, PageFieldName, TotalType, Index)
expression An expression that returns a GroupingDefs object.
GroupingDefName Required String. Specifies the GroupingDef object to be used to create the total.
GroupingFieldName Required String. Specifies the grouping field to be used to create the total.
PageFieldName Required String. Specifies the PageField object to be used to create the total.
TotalType Required dscTotalTypeEnum. Specifies the function to be used to create the total.
Index Optional Variant. Specifies where the new total will be placed in the collection.
Syntax 2
expression.AddTotal(Name, Field, Function)
expression An expression that returns a PivotView object.
Name Required String. Specifies the name of the total.
Field Required PivotField. Specifies the field to be used to create the total.
Function Required PivotTotalFunctionEnum. Specifies the function to be used to create the total.