Express > Express Assembly Interfaces > IEaxDataAreaTransformation > IEaxDataAreaTransformation.Execute
Execute(OutSelSet: IDimSelection): IMatrix;
Execute(OutSelSet: Prognoz.Platform.Interop.Dimensions.IDimSelection): Prognoz.Platform.Interop.Matrix.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.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Matrix;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
DArea: IEaxDataArea;
DAreaSlice: IEaxDataAreaSlice;
CalcTransformations: IEaxDataAreaTransformations;
CalcTransformation: IEaxDataAreaTransformation;
OutSelSet: IDimSelectionSet;
Matrix: IMatrix;
Begin
// Get repository
MB := Params.Metabase;
// 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);
System.Diagnostics.Debug.WriteLine("Number of values in data matrix = " + Matrix.ValueCount.ToString());
// Save changes
(Express As IMetabaseObject).Save();
End Sub;
See also: