PrepareMatrix(Dest: ICubeInstanceDestination): IMatrix;
Dest. Built cube display version.
The PrepareMatrix method builds matrix that will be saved to the cache for the specified cube display option.
If cache contains already cached matrix with data for the specified cube display version, it will be rebuilt. Because of implementation particularity, the method returns empty matrix which structure corresponds to data source structure.
Executing the example requires that the repository contains a cube with the STD_CUBE identifier. The repository uses In-Memory caching mechanism.
Add links to the Cubes and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
CubeInst: ICubeInstance;
DestInst: ICubeInstanceDestination;
InMem: IInMemManager;
Begin
Mb := MetabaseClass.Active;
// Open cube
CubeInst := Mb.ItemById("STD_CUBE").Open(Null) As ICubeInstance;
DestInst := CubeInst.Destinations.DefaultDestination;
// Manager to work with In-Memory cache
InMem := New InMemManager.Create;
InMem.PrepareMatrix(DestInst);
End Sub UserProc;
On executing the example the cache updates all data of the specified cube.
See also: