IPrxDataSources.Add

Syntax

Add(Value: IMatrixDataSource): IPrxDataSource;

Parameters

Value. Multidimensional data source.

Description

The Add method adds a data source passed by the Value parameter.

Example

Executing the example requires a cube with the CUBE identifier and a regular report with the REGULAR_REPORT identifier. Add links to the Metabase, Report, Cubes, Matrix system assemblies in the unit.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Cube: ICubeInstance;
    Report: IPrxReport;
    MatrDS: IMatrixDataSource;
    DtSources: IPrxDataSources;
    DtSource: IPrxDataSource;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("REGULAR_REPORT").Edit;
    Cube := MB.ItemById("CUBE").Open(NullAs ICubeInstance;
    Report := MObj As IPrxReport;
    MatrDS := Cube.Destinations.DefaultDestination As IMatrixDataSource;
    DtSources := Report.DataSources;
    DtSource := DtSources.Add(MatrDS);
    MObj.Save;
End Sub UserProc;

After executing the example the cube with the CUBE identifier is added as a regular report data source.

See also:

IPrxDataSources