IPrxSlices.FindByKey

Syntax

FindByKey(Key: Integer): IPrxSlice;

Parameters

Key - key of a data slice.

Description

The FindByKey method searches for and returns an object containing a data slice.

Example

Sub Main;

Var

MB: IMetabase;

Report: IPrxReport;

DtSources: IPrxDataSources;

Slices: IPrxSlices;

Slice: IPrxSlice;

s: String;

Begin

MB := MetabaseClass.Active;

Report := MB.ItemById("Report").Bind As IPrxReport;

DtSources := Report.DataSources;

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

Slice := Slices.FindByKey(2);

s := Slice.Name;

End Sub Main;

After executing the example the "s" variable contains the name of the data slice that has the 2 key. The identifier of the regular report - Report.

See also:

IPrxSlices