IPivotHeader.AddDim

Syntax

AddDim(Dim: IDimInstance);

Parameters

Dim - dimension that must be added to the selected area of table header.

Description

The AddDim method adds the Dim dimension to the selected table header. A dimension is added to the end of the current dimensions list.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. There is at least one fixed dimension in the dimensions list, and another one that is in rows.

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    Pivot: IPivot;
    Header: IPivotHeader;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("EXPRESS_REPORT").Edit;
    Expr := MObj As IEaxAnalyzer;
    Pivot := Expr.Pivot;
    Header := Pivot.LeftHeader;
    Header.AddDim(Pivot.FixedHeader.Dim(0));
    MObj.Save;
End Sub Main;

After executing the example a fixed dimension is added to the list of dimensions that are in rows. This dimension is placed at the end of the dimensions list.

See also:

IPivotHeader