IPivotHeader.InsertDim

Syntax

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

Parameters

InsertedDim. Dimension that must be inserted to the selected table header.

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

pos. Position, relative to the Dim dimension, to which the dimension is inserted.

Description

The InsertDim method inserts the InsertedDim dimension into the selected table header. The inserting is executed into the specified position relative to the Dim dimension.

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

MObj.Save;

End Sub Main;

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