IPrxTableIsland.Copy

Syntax

Copy([Sheet: IPrxSheet = Null;] [Range: IPrxRange]): IPrxTableIsland;

Parameters

Sheet - regular report sheet, to which the relational data area is to be copied.

Range - sheet area (a cell or a cell range) where the copied relational data area is to be placed.

Description

The Copy method copies a relational data area. If the method parameters (Sheet and Range) are not specified, the values of the copy parameter match the values of the original relational area.

Example

Sub Main;

Var

MB: IMetabase;

MObj : IMetabaseObject;

Report : IPrxReport;

TabIs : IPrxTableIslands;

TI : IPrxTableIsland;

Sheet : IPrxSheet;

Range : ITabRange;

Begin

MB := MetabaseClass.Active;

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

Report := MObj As IPrxReport;

TabIs := Report.TableIslands;

TI := TabIs.Item(0);

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

Range := (Sheet As IPrxTable).TabSheet.Cell(20,5);

TI.Copy(Sheet, Range);

MObj.Save;

End Sub Main;

After executing the example a copy of the relational data area is created. Report - an identifier of a regular report.

See also:

IPrxTableIsland