IPrxDataIslands.Add

Syntax

Add: IPrxDataIsland;

Description

The Add method adds a new data area on the sheet of the regular report.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Report: IPrxReport;

DIs: IPrxDataIslands;

DI: IPrxDataIsland;

Range: ITabRange;

Begin

MB := MetabaseClass.Active;

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

Report := MObj As IPrxReport;

DIs := Report.DataIslands;

DI := DIs.Add;

DI.Sheet := Report.Sheets.Item(Report.Sheets.Count-1);

DI.Slice := Report.DataSources.Item(0).Slices.Item(0);

Range := Report.ParseCell(DI.Sheet.Name+"!A0").Range;

DI.Range := Range;

DI.ReadOnly := False;

DI.OutputPart := PrxDataIslandPart.Full;

DI.AdjustMode := PrxAdjustMode.RowsThenColumns;

MObj.Save;

End Sub Main;

After executing the example a data area is created on the last sheet of the regular report in the A0 cell. Data source - the first slice of the first data source of the regular report. The identifier of the regular report - Report.

See also:

IPrxDataIslands