IPivotEvaluatorTotals.RowTotalName

Syntax

RowTotalName(Type: PivotEvaluatorElementType): String;

Parameters

Type. Type of totals displayed by rows.

Description

The RowTotalName property determines a custom name of totals displayed by rows.

Comments

If property value is not set, default total name is displayed.

To determine custom names of totals displayed by columns, use the IPivotEvaluatorTotals.ColumnTotalName property.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. The report must contain a data table built on a cube.

Add links to the Express, Metabase, Pivot, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MBDes: IMetabaseObjectDescriptor;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    PivEv: IPivotEvaluator;
    Totals: IPivotEvaluatorTotals;
    Sum, Avg: PivotEvaluatorElementType;
Begin
    
// Get repository
    MB := MetabaseClass.Active;
    
// Get express report
    MBDes := MB.ItemById("EXPRESS");
    
// Open express report for edit
    Express := MBDes.Edit As IEaxAnalyzer;
    
// Get report data table display options
    Pivot := Express.Pivot;
    
// Get settings of table calculated indicators
    PivEv := Pivot.Evaluator;
    
// Get table totals collection
    Totals := PivEv.Totals;
    
// Set type of totals calculated for rows
    Sum := PivotEvaluatorElementType.Sum;
    Totals.RowTypes := Sum;
    
// Set type of totals calculated for columns
    Avg := PivotEvaluatorElementType.Avg;
    Totals.ColumnTypes := Avg;
    
// Set custom name for totals by rows
    Totals.RowTotalName(Sum) := "Total";
    
// Set custom name for totals by columns
    Totals.ColumnTotalName(Avg) := "Average";
    
// Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, totals are calculated for table rows and columns, for which custom names will be set: Total for totals calculated by rows, and Average for totals calculated by columns.

See also:

IPivotEvaluatorTotals