Clear(Value: IDimSelection; Key: Integer);
Value. Dimension selection where alternative hierarchy is placed.
Key. Dimension key.
The Clear method removes collection of alternative hierarchies from specified dimension.
To clear collections from analytical data area, use IEaxDataAreaHierarchies.ClearAll.
To add alternative hierarchy to collection, use IEaxDataAreaHierarchies.Add.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. One of report dimensions must contain at least one alternative hierarchy.
Add links to the Dimensions, Express, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Hiers: IEaxDataAreaHierarchies;
Slice: IEaxDataAreaSlice;
DimSel: IDimSelection;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get data source slice
Slice := Express.DataArea.Slices.Item(0);
//Get dimension selection
DimSel := Slice.Selection.Item(0);
// Remove alternative hierarchy from dimension
Hiers := Express.DataArea.Hierarchies;
Hiers.Clear(DimSel, DimSel.Dimension.Key);
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example all alternative hierarchies will be removed from specified dimension.
See also: