Equal(Other: IEaxDimensionDescriptor): Boolean;
Other. Dimension description which is being compared.
The Equal method compare dimension description with another description.
Available values:
True. Dimension descriptions are equal.
False. Dimension descriptions are not equal.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing table.
Add links to the Dimensions, Express, Metabase, Pivot system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
DA: IEaxDataArea;
Slice, SliceDim: IEaxDataAreaSlice;
PivotDimKey, PivotDimKeyTwo: Integer;
DimensionInst, DimensionInstTwo: IEaxDimensionInstance;
DimDescr, DimDescrTwo: IEaxDimensionDescriptor;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Analyzer := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get data area
DA := Analyzer.DataArea;
// Get data slice
Slice := DA.Slices.Item(0);
// Get dimension key
PivotDimKey := Analyzer.Pivot.DimItem(3).Key;
// Get dimension data by key
DimensionInst := Slice.GetDimension(PivotDimKey);
// Display to the console selection elements and dimension name
Debug.WriteLine("Selection elements - " + DimensionInst.Selection.ToString("", ", ", False));
Debug.WriteLine("Dimension name - " + DimensionInst.Dimension.Name);
// Get dimension description
DimDescr := DimensionInst As IEaxDimensionDescriptor;
// Display to the console dimension key
Debug.WriteLine("Dimension key - " + DimDescr.DimKey.ToString);
// Get slice to which dimension belongs
SliceDim := DimDescr.Slice As IEaxDataAreaSlice;
// Display to the console identifier of data slice
Debug.WriteLine("Identifier of data slice - " + SliceDim.Id);
// Display to the console type of dimension parent object
Select Case DimDescr.SliceType As Integer
Case 0: Debug.WriteLine("Type of dimension parent object - PivotSlice");
Case 1: Debug.WriteLine("Type of dimension parent object - PrxSlice");
Case 2: Debug.WriteLine("Type of dimension parent object - Visualizer");
End Select;
// Get dimension description
PivotDimKeyTwo := Analyzer.Pivot.DimItem(4).Key;
DimensionInstTwo := Slice.GetDimension(PivotDimKeyTwo);
DimDescrTwo := DimensionInstTwo As IEaxDimensionDescriptor;
// Display to the console attribute of dimension description equality
If DimDescr.Equal(DimDescrTwo) Then
Debug.WriteLine("Dimension descriptions are equal");
Else
Debug.WriteLine("Dimension descriptions are not equal");
End If;
End Sub UserProc;
After executing the example the console window displays:
Elements of dimension selection.
Dimension name.
Dimension key.
Identifier of data slice where specified dimension is located.
Dimension parent object type.
Matching result of two description of dimension.
See also: