EvaluateForSingleElement: Boolean;
The EvaluateForSingleElement property determines whether totals should be calculated if a level contains only one element.
Available values:
True. Totals by level with one element will be calculated.
False. Totals by level with one element will not be calculated. Default value.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report contains the table that displays elements of different levels. One of the levels must display only one element.
Add links to the Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Pivot: IPivot;
Totals: IPivotEvaluatorTotals;
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;
// Set type of totals calculated for rows
Totals.RowTypes := PivotEvaluatorElementType.Sum;
// Place totals before dimension elements
Totals.PlaceBeforeData := True;
// Disable calculation of hierarchy totals
Totals.HierarchyTotals := False;
// Enable calculation of totals for one element
Totals.EvaluateForSingleElement := True;
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, row totals are calculated in the table. Calculation is executed by levels and also for the level with one element. Totals are displayed before data cells.
See also: