IPivot.DataSource

Syntax

DataSource: IMatrixDataSource;

Description

The DataSource property determines a data source based on which a table is created.

Comments

On working with an object, on which a table of the express report is based, a data source of the express report can be determined in this property.

If the express report is based on multiple data sources, access to it is executed by the IEaxDataAreaSource.VirtualSources property. The IPivot.DataSource property in this case returns display version instance of virtual cube, which merges express report data sources. This virtual cube is a hidden child object of an express report.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. This express report is based on one data source. The repository also contains a cube with the Cube_2 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Expr: IEaxAnalyzer;
    CubeInst: ICubeInstance;
    CubeDest: ICubeInstanceDestination;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("EXPRESS_REPORT").Edit;
    CubeInst := MB.ItemById("Cube_2").Open(NullAs ICubeInstance;
    CubeDest := CubeInst.Destinations.DefaultDestination;
    Expr := MObj As IEaxAnalyzer;
    Expr.Pivot.DataSource := CubeDest As IMatrixDataSource;
    MObj.Save;
End Sub UserProc;

On executing the example the data source is changed in the express report.

See also:

IPivot