IEaxSheets.Add

Syntax

Add(Value: IEaxAnalyzer): IEaxSheet;

Parameters

Value. Express report that is the basis to create a sheet.

Description

The Add method creates the sheet that is based on the current express report.

Comments

The child object is added when performing the Add method for the source express. The child object is the copy of the express report, passed by the Value parameter.

Example

Executing the example requires two express reports with the EXPRESS_REPORT, EXPRESS_REPORT_2 identifiers and a cube with the Cube_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    Sheet: IEaxSheet;
    CubeInst: ICubeInstance;
Begin
    MB := MetabaseClass.Active;
    Eax := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    //Creating a sheet based on current express report
    Eax.Sheets.Add(MB.ItemById("EXPRESS_REPORT_2").Bind As IEaxAnalyzer);
    //Creating a sheet based on a new express report
    Sheet := Eax.Sheets.AddNew;
    //Specifying the source for a new sheet
    CubeInst := MB.ItemById("Cube_1").Open(NullAs ICubeInstance;
    Sheet.Analyzer.OpenCube(CubeInst);
    (Eax As IMetabaseObject).Save;
End Sub UserProc;

Two sheets are created in the EXPRESS_REPORT express report when the sample is performed. The first sheet is based on the current EXPRESS_REPORT_2 express report, the second is based on the new express report with the Cube_1 cube as the source.

See also:

IEaxSheets