SelectTerritory(TerritoryId: Integer; [Select: Boolean = True;] [Recursive: Boolean = False]);
TerritoryId: Territory identifier.
Select — optional parameter that enables the user to select or deselect an element. True if the element is to be selected, False if the element is to be deselected.
Recursive — optional parameter that enables the user to select or deselect the child elements in the hierarchy. True if the element is to be selected, False if the element is to be deselected.
The SelectTerritory method changes selection of the territory dimension element corresponding to the territory with the identifier TerritoryId.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Expr: IEaxAnalyzer;
EMap: IEaxMap;
Begin
MB:=MetabaseClass.Active;
MObj:=MB.ItemById("EXPRESS_REPORT").Edit;
Expr:=MObj As IEaxAnalyzer;
EMap:=Expr.Map;
EMap.SelectTerritory(57);
MObj.Save;
End Sub Main;
After executing the example the territory dimension element corresponding to the territory with the 57 identifier is added to the selection. Express report identifier - EXPRESS_REPORT.
See also: