Item(Index: Integer): ITabRegion;
Index is the index of the region in the table regions collection, which should be received.
The Item property returns the region, whose index is passed as the Index input parameter.
Sub Main;
Var
MB: IMetabase;
Rep: IPrxReport;
Regs: ITabRegions;
Reg: ITabRegion;
s: String;
i: Integer;
Begin
MB := MetabaseClass.Active;
Rep := MB.ItemById("Reg_rep").Bind As IPrxReport;
Regs := Rep.ActiveSheet.Table.Regions;
If Regs.Count <> 0 Then
Reg := Regs.Item(0);
i := Reg.Key;
End If;
End Sub Main;
As a result the "i" variable will contain the key of the first region of the active sheet of the regular report.
See also: