Execute(OutSelSet: IDimSelection): IMatrix;
OutSelSet. Output dimension selection.
The Execute method transforms data by formula and returns data matrix.
To get dimension selection where data transformation formula is, use IEaxDataAreaTransformation.Selection.
Executing the example requires that the repository contains an express report with the EXPRESS identifier that contains the formula edited in the expression editor.
Add links to the Dimensions, Express, Matrix, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
DArea: IEaxDataArea;
DAreaSlice: IEaxDataAreaSlice;
CalcTransformations: IEaxDataAreaTransformations;
CalcTransformation: IEaxDataAreaTransformation;
OutSelSet: IDimSelectionSet;
Matrix: IMatrix;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get data source slice
DArea := Express.DataArea;
DAreaSlice := DArea.Slices.Item(0);
// Get formula of data transformation in analytical area
CalcTransformations := DAreaSlice.CalcTransformations;
CalcTransformation := CalcTransformations.Item(0);
// Get selection
OutSelSet := CalcTransformation.Selection;
// Get data matrix
Matrix := CalcTransformation.Execute(OutSelSet);
Debug.WriteLine("Number of values in data matrix = " + Matrix.ValueCount.ToString);
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, the Matrix variable will stock data matrix. The console displays number of its values.
See also: