IPrxDataIslandDimensionLayoutNodes.RemoveByKey

Syntax

RemoveByKey(NodeKey: Integer): Boolean;

Parameters

NodeKey - key of an element of an arbitrary title.

Description

The RemoveByKey method removes an element of an arbitrary title based on the specified key. The element to be removed is searched for on a single title level. If the removal is successful, the method returns True, otherwise it returns False.

Example

The following example assumes that there is the Report object with the IPrxReport type.

Sub UserProc;

Var

Report: IPrxReport;

DIs: IPrxDataIslands;

DI: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

Dim : IDimInstance;

DimProp : IPrxDataIslandDimension;

RN : IPrxDataIslandDimensionLayoutNodes;

Key : Integer;

Result : Boolean;

Begin

DIs := Report.DataIslands;

DI := DIs.Item(0).Edit;

Prop := DI.Properties;

Dim := DI.Slice.LeftHeader.Item(0).Dimension;

DimProp := Prop.Dimension(Dim.Dimension);

RN := DimProp.Layout.RootNodes;

Key := RN.Item(0).Key;

Result := RN.RemoveByKey(Key);

Debug.WriteLine(Result);

DI.Save;

End Sub UserProc;

After executing the example an element of an arbitrary title is removed by the specified key. The console window displays removal results.

See also:

IPrxDataIslandDimensionLayoutNodes