IPrxDataIslandHeader.CanFitTo

Syntax

CanFitTo(DataIsland: IPrxDataIslandProperties): Boolean;

Parameters

DataIsland: Data area, matching with which is checked for.

Description

The CanFitTo property determines whether it is possible to match the table by rows or columns with the data area, passed as the DataIsland parameter.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Report: IPrxReport;

DIs: IPrxDataIslands;

DI, DI1: IPrxDataIsland;

Prop: IPrxDataIslandProperties;

THead: IPrxDataIslandHeader;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Report").Edit;

Report := MObj As IPrxReport;

DIs := Report.DataIslands;

DI1 := DIs.Item(1);

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

    Prop := DI.Properties;

    THead := Prop.TopHeader;

    If THead.CanFitTo(DI1) Then

    THead.FitTo := DI1;

    End If;

DI.Save;

End Sub Main;

After executing the example matching columns of the second data area is set for columns of the first data area, if this is possible. The identifier of the regular report - Report.

See also:

IPrxDataIslandHeader