IPrxDataIslandDimensionLayout.PreserveDimensionElementsOrder

Syntax

PreserveDimensionElementsOrder: Boolean;

Description

The PreserveDimensionElementsOrder property determines whether layout elements should be used in the order they are located in the dimension. When this property is set to True, the layout elements bound to slice elements are automatically arranged based on their position in the dimension. With auto arrangement enabled the elements that are not bound to a slice element are arranged on the source level after the layout element after which they were initially added to the arbitrary layout. If the property is set to False, layout elements can be positioned in any order.

The default property value is False.

Example

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

Sub UserProc;

Var

Report: IPrxReport;

DI: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

Dim : IDimInstance;

DimProp : IPrxDataIslandDimension;

RN : IPrxDataIslandDimensionLayoutNodes;

n : IPrxDataIslandDimensionLayoutNode;

Cond : ITabFormatCondition;

ValFormat : ITabFormatValues;

Begin

DI := Report.DataIslands.Item(0).Edit;

    Prop := DI.Properties;

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

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

    DimProp.CustomLayout := True;

    DimProp.Layout.PreserveDimensionElementsOrder := True;

    RN := DimProp.Layout.RootNodes;

    RN.Clear;

 

    n := RN.Add;

    n.DimElement(Dim) := 6;

    n.Include := TriState.OnOption;

    n.ElementStyle.Header.BackgroundColor := New GxColor.CreateRGB(50,60,210);

    n.ElementStyle.Data.BackgroundColor := New GxColor.CreateRGB(150,160,210);

 

    n := RN.Add;

    n.DimElement(Dim) := 4;

    n.Include := TriState.OnOption;

    n.ElementStyle.Header.BackgroundColor := New GxColor.CreateRGB(200,100,100);

    n.ElementStyle.Data.BackgroundColor := New GxColor.CreateRGB(220,150,150);

 

    n := RN.Add;

    n.DimElement(Dim) := 0;

    n.Include := TriState.OnOption;

    n.ElementStyle.Header.BackgroundColor := New GxColor.CreateRGB(0,100,100);

    n.ElementStyle.Data.BackgroundColor := New GxColor.CreateRGB(0,100,210);

DI.Save;

End Sub UserProc;

After executing the example an arbitrary title consisting of three elements is created. The order of displaying elements in the data area corresponds to dimension hierarchy. Both data and title appearance is set for elements of arbitrary layout.

See also:

IPrxDataIslandDimensionLayout