Execute;
The Execute method calculates data slice, the calculation result is a multidimensional matrix, which can be obtained by using the Matrix property.
Executing the example requires a regular report with the Report identifier, the report sheet contains a data area. Add links to the Metabase, Report system assemblies.
Sub Main;
Var
MB: IMetabase;
Report: IPrxReport;
DtSources: IPrxDataSources;
Slices: IPrxSlices;
Slice: IPrxSlice;
Matrix: IMatrixModel;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("Report").Bind As IPrxReport;
DtSources := Report.DataSources;
Slices := DtSources.Item(0).Slices;
Slice := Slices.Item(0);
Slice.Execute;
Matrix := Slice.Matrix;
Debug.WriteLine(Matrix.DimensionCount);
End Sub Main;
After executing the example the Matrix variable contains a multidimensional matrix that is the result of executing the first slice of the data source of the regular report. The console displays number of dimensions of one slice.
Executing the example requires a regular report with the Report identifier, the report sheet contains a data area. Add links to the Metabase, Report, Matrix, ForeSystem system assemblies.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Matrix;
Imports Prognoz.Platform.Interop.ForeSystem;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
DtSources: IPrxDataSources;
Slices: IPrxSlices;
Slice: IPrxSlice;
Matrix: IMatrixModel;
Begin
MB := Params.Metabase;
Report := MB.ItemById["Report"].Bind() As IPrxReport;
DtSources := Report.DataSources;
Slices := DtSources.Item[0].Slices;
Slice := Slices.Item[0];
Slice.Execute();
Matrix := Slice.Matrix;
System.Diagnostics.Debug.WriteLine(Matrix.DimensionCount);
End Sub;
The result of Fore.NET example execution matches with that of Fore example.
See also: