LevelTotals: Boolean;
LevelTotals: Boolean;
The LevelTotals property determines whether the totals by levels of dimensions are calculated.
If the property is set to True, totals by levels are displayed on displaying of totals. If the property is set to False, totals are calculated without taking into account dimension levels.
The property is set to True by default.
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.
Add links to the Express, Pivot system assemblies.
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.LevelTotals := True;
Totals.OverallTotal := False;
Totals.HierarchyTotals := False;
End Sub Button1OnClick;
After executing the example, totals (sum of values) are calculated for the table: totals by levels are enabled, grand total, and totals by hierarchy are disabled.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
OLAP: IEaxAnalyzer;
Pivot: IPivot;
Totals: IPivotEvaluatorTotals;
Begin
OLAP := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
Pivot := OLAP.Pivot;
Totals := Pivot.Evaluator.Totals;
Totals.RowTypes := 1;
Totals.LevelTotals := True;
Totals.OverallTotal := False;
Totals.HierarchyTotals := False;
End Sub Button1OnClick;
See also: