OverallTotal: Boolean;
The OverallTotal property determines whether grand total values are displayed in parent element row.
Available values:
False. Values of grand totals are not displayed in parent element row. Default value.
True. Values of grand totals are displayed in parent element row.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. Heading and sidehead dimension have several levels.
Add links to the Express, Pivot system assemblies.
Sub USerProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Totals: IPivotEvaluatorTotals;
HeaderS: IPivotInsteadOwnerTotalsSettings;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get report data table display settings
Pivot := Express.Pivot;
// Get table totals collection
Totals := Pivot.Evaluator.Totals;
// Clear totals collection
Totals.Clear;
// Set type of totals calculated by rows
Totals.RowTypes := PivotEvaluatorElementType.Sum;
// Set type of totals calculated by columns
Totals.ColumnTypes := PivotEvaluatorElementType.Max;
// Enable hierarchy totals calculation
Totals.HierarchyTotals := True;
// Set up displaying totals in sidehead parent element string
HeaderS := totals.LeftHeaderSettings;
// Set displaying grand total in row
HeaderS.OverallTotal := True;
// Set displaying hierarchy total in row
HeaderS.HierarchyTotal := True;
// Set type of totals displayed in row
HeaderS.TotalType := PivotEvaluatorElementType.Sum;
// Set type of element name
HeaderS.NamingMode := PivotTotalParentNamingMode.Combined;
// Set separator type
HeaderS.NameSeparator := "//";
// Set up displaying totals in heading parent element row
HeaderS := totals.TopHeaderSettings;
// Set displaying grand total in row
HeaderS.OverallTotal := True;
// Set type of totals displayed in row
HeaderS.TotalType := PivotEvaluatorElementType.Max;
// Set type of element name
HeaderS.NamingMode := PivotTotalParentNamingMode.TotalMethod;
// Save changes
(Express As IMetabaseObject).Save;
End Sub USerProc;
After executing the example in express report table:
Row and column totals are calculated.
Grand total and hierarchy totals in sidehead are displayed in parent element row; total type is sum, element name - composite name with the // separator.
Grand total in heading is displayed in parent element row; total type is maximum, element name is total method.
See also: