IEaxAnalyzer.CreateMultiOlap

Syntax

CreateMultiOlap(DataSource: IMatrixDataSource);

Parameters

DataSource. Data source used as a base of express report.

Description

The CreateMultiOlap method creates an express report that contains several data sources.

Comments

If DataSource is a virtual cube, after the CreateMultiOlap method is called, the report data source collection is filled:: IEaxAnalyzer.DataSources. The virtual cube used as the express report base, cannot be a constant repository object. Whether an object is a constant repository object is determined by the property  IMetabaseObjectDescriptor.IsPermanent.

If DataSource is not a virtual cube, a standard express report is created based on a single data source with empty collection IEaxAnalyzer.DataSources.

Example

The time series database with the FC_FIRST and FC_SECOND identifiers are required to perform an example in repository. It is also necessary to add links to the Metabase, Cubes, Express and Matrix system assemblies.

    Sub UserProc;
    Var
        Mb: IMetabase;
        Ci: IMetabaseObjectCreateInfo;
        VirtCube: IVirtualCube;
        SourceInst, VirtCubeInst: ICubeInstance;
        DataSource: IMatrixDataSource;
        Eax: IEaxAnalyzer;
        Dest: ICubeInstanceDestination;
    Begin
        Mb := MetabaseClass.Active;
        Ci := Mb.CreateCreateInfo;
        Ci.Permanent := False;
    // Create  a new express  report
        Ci.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
        Eax := Mb.CreateObject(Ci).Edit As IEaxAnalyzer;
    // Create virtual cube
        Ci.ClassId := MetabaseObjectClass.KE_CLASS_VIRTUALCUBE;
        VirtCube := Mb.CreateObject(Ci).Edit As IVirtualCube;
    // Add the first time series database to the virtual cube
        SourceInst := Mb.ItemById("FC_FIRST").Open(NullAs ICubeInstance;
        Dest := SourceInst.Destinations.DefaultDestination;
        Debug.WriteLine(Dest.Name);
        VirtCube.Sources.Add(Dest.DestinationModel);
    // Add the second time series database to the virtual cube
        SourceInst := Mb.ItemById("FC_SECOND").Open(NullAs ICubeInstance;
        Dest := SourceInst.Destinations.DefaultDestination;
        Debug.WriteLine(Dest.Name);
        VirtCube.Sources.Add(Dest.DestinationModel);
    // Create ER based on a pre-created virtual cube
        VirtCubeInst := (VirtCube As IMetabaseObjectDescriptor).Open(NullAs ICubeInstance;
        DataSource := VirtCubeInst.Destinations.DefaultDestination As IMatrixDataSource;
        Eax.CreateMultiOlap(DataSource);
    // Save express report
        (Eax As IMetabaseObject).Save;
    End Sub UserProc;

After executing this example, an express report is created data source of which is a nonconstant virtual cube. Virtual cube is based on two time series databases.

See also:

IEaxAnalyzer