HierarchyTotals: Boolean;
The HierarchyTotals property determines whether totals are calculated by hierarchy.
Available values:
True. Default value. Totals are calculated by hierarchy.
False. Totals are calculated without taking into account hierarchy.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. Click the button to start executing the example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
OLAP: IEaxAnalyzer;
Pivot: IPivot;
Totals: IPivotEvaluatorTotals;
Begin
OLAP := UiErAnalyzer1.ErAnalyzer;
Pivot := OLAP.Pivot;
Totals := Pivot.Evaluator.Totals;
Totals.RowTypes := PivotEvaluatorElementType.Sum;
Totals.HierarchyTotals := True;
Totals.LevelTotals := False;
End Sub Button1OnClick;
After executing the example the totals (sum of values) are calculated for the table by all hierarchy levels:
See also: