Matrix: IMatrixModel;
The Matrix property returns an object that contains a multidimensional matrix obtained by fixing one or several cube dimensions.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
DtSources: IPrxDataSources;
Slices: IPrxSlices;
Slice: IPrxSlice;
Matrix: IMatrixModel;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REPORT").Bind;
Report := MObj As IPrxReport;
DtSources := Report.DataSources;
Slices := DtSources.Item(0).Slices;
Slice := Slices.Item(0);
Slice.Execute;
Matrix := Slice.Matrix;
End Sub UserProc;
After executing the example the Matrix variable contains a multidimensional matrix based on the first slice of data source for the regular report with the Report identifier.
See also: