IPivotHeader.InsertDim

Syntax

InsertDim(InsertedDim: IDimInstance; Dim: IDimInstance; pos: PivotDimPosition): Boolean;

Parameters

InsertedDim. The dimension that must be inserted to table header.

Dim. The dimension, relative to which the InsertedDim dimension is inserted.

pos. The position relative to the Dim dimension, to which the dimension will be inserted.

Description

The InsertDim method inserts the dimension to the specified position of the table header.

Comments

The dimension is inserted to the specified position relative to the Dim dimension. The method returns True if the dimension was inserted to table header, and False if insertion is not available for some reason.

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 UserProc;
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.InsertDim(Pivot.FixedHeader.Dim(0), Header.Dim(0), PivotDimPosition.After);
    MObj.Save;
End Sub UserProc;

After executing the example a fixed dimension is shifted to the list of dimensions that are in rows. This dimension is placed after the first dimension that is in rows.

See also:

IPivotHeader