IPrxSlices.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index - index of data slice.

Description

The Remove method deletes the data source, which index is passed by the Index parameter.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Report: IPrxReport;

DtSources: IPrxDataSources;

Slices: IPrxSlices;

s: String;

Begin

MB:=MetabaseClass.Active;

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

Report:=MObj As IPrxReport;

DtSources:=Report.DataSources;

Slices:=DtSources.Item(0).Slices;

If Slices.Remove(1)Then

s:="Remove";

Else

s:="Don't remove";

End If;

MObj.Save;

End Sub Main;

After executing the example the "s" variable contains "Remove" if the second slice of the first data source of the regular report has been successfully deleted. The identifier of the regular report - Report.

See also:

IPrxSlices