Execute(Dimensions: IDimSelectionSet): IMatrix;
Dimensions - selection, according to which matrix is calculated.
The Execute method calculates a matrix with data in accordance with the specified elements selection and calculation parameters.
Unlike the IMatrixDataSource.Execute method this method takes into account the specified parameters of calculation of an output matrix. When the method is executed, data is extracted from the server by executing formed SQL queries.
Executing the example requires that the repository contains a cube with the Cube_1 identifier. Dictionaries with the Dim_1 and Dim_2 identifiers are set as dimensions of this cube.
Add links to the Cubes, Dimensions, Matrix, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
CubeInst: ICubeInstance;
MatrDS: IMatrixDataSource;
DimSS: IDimSelectionSet;
MatrExecutor: IMatrixDataSourceExecutor;
Matr: IMatrix;
Begin
MB := MetabaseClass.Active;
CubeInst := MB.ItemById("Cube_1").Open(Null) As ICubeInstance;
MatrDS := CubeInst.Destinations.DefaultDestination As IMatrixDataSource;
MatrExecutor := MatrDS.CreateExecutor;
(MatrExecutor As IMatrixDataSourceExecutorSetup).DimensionsIntegrityCheck := True;
DimSS := MatrDS.CreateDimSelectionSet;
DimSS.FindById("Dim_1").SelectAll;
DimSS.FindById("Dim_2").SelectAll;
Try
Matr := MatrExecutor.Execute(DimSS);
Except On Ex: Exception Do
Debug.WriteLine("Dimension creation error.");
Debug.WriteLine("Error text: " + Ex.Message);
Finally
End Try;
End Sub UserProc;
On executing the example an output cube matrix is calculated. During calculation, building of dictionaries that are used to compose selection is checked. If errors occur on building, text of error will be displayed in the development environment console.
See also: