IPrxDataIslandDimensionLayoutNode.Include

Syntax

Include: TriState;

Description

The Include property determines whether a heading element is to be displayed in the data area.

Example

Executing the example requires a form, a button on this form and named Button1, the UiReport component with the UiReport1 identifier used as a data source for the ReportBox component. The repository must contain a regular report with the OBJ_REPORT identifier containing a data area.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

MB: IMetabase;

ReportObj: IMetabaseObject;

Report: IPrxReport;

DIs: IPrxDataIslands;

DI: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

Dim: IDimInstance;

DimProp: IPrxDataIslandDimension;

Layout: IPrxDataIslandDimensionLayout;

RN: IPrxDataIslandDimensionLayoutNodes;

Element, Child: IPrxDataIslandDimensionLayoutNode;

i: Integer;

Begin

MB := MetabaseClass.Active;

ReportObj := MB.ItemById("OBJ_REPORT").Edit;

Report := ReportObj As IPrxReport;

DIs := Report.DataIslands;

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

Prop := DI.Properties;

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

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

DimProp.CustomLayout := True;

Layout := DimProp.Layout;

Layout.FitToSelection := False;

RN := Layout.RootNodes;

RN.Clear;

Element := RN.Add;

Element.DimElement(Dim) := 1;

Element.Caption := Dim.Elements.Name(1);

Element.Include := TriState.OnOption;

For i := 2 To 5 Do

Child := Element.Children.Add;

Child.Caption := Dim.Elements.Name(i);

Child.DimElement(Dim) := i;

Child.Include := TriState.OnOption;

End For;

DI.Save;

ReportObj.Save;

UiReport1.Active := False;

UiReport1.Instance := ReportObj;

End Sub Button1OnClick;

After executing the example an element of arbitrary title is created, and a number of child elements is created for this element. All elements of the title are always displayed in the first data area collection of the regular report. Names of title elements match names of the dimension elements.

See also:

IPrxDataIslandDimensionLayoutNode