IPrxTableIslands.Add

Syntax

Add : IPrxTableIsland;

Description

The Add method adds a relational area to a regular report sheet.

Example

Sub Main;

Var

MB: IMetabase;

MObj : IMetabaseObject;

Report : IPrxReport;

TabIs : IPrxTableIslands;

TI : IPrxTableIsland;

Range : ITabRange;

Layout : IPrxTableIslandLayout;

Row : IPrxTableIslandLayoutRow;

Cell : IPrxTableIslandLayoutCell;

Begin

MB := MetabaseClass.Active;

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

Report := MObj As IPrxReport;

TabIs := Report.TableIslands;

TI := TabIs.Add;

TI.Source := Report.TableSources.Item(0);

TI.Sheet := Report.Sheets.Item(0);

TI.AdjustMode := PrxAdjustMode.Columns;

Range := (TI.Sheet As IPrxTable).TabSheet.Cell(1,1);

TI.Range := Range;

Layout := TI.Layout;

Row := Layout.Add;

Row.Height := 30;

Cell := Row.Add;

Cell.Field.FieldName := "ID";

Cell := Row.Add;

Cell.Field.FieldName := "NAME";

TI.Save;

MObj.Save;

End Sub Main;

After executing the example a relational data area is added to the regular report sheet. Report - identifier of a regular report.

See also:

IPrxTableIslands