IEaxAnalyzer.CopyFrom

Syntax

CopyFrom(Source: IEaxAnalyzer);

Parameters

Source. Express report, which data should be copied to the current report.

Description

The CopyFrom method copies parameters of the report passed by the Source parameter, to the current express report.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. This report is in read-only mode for the current user.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Expr, Expr1: IEaxAnalyzer;
    CrInfo: IMetabaseObjectCreateInfo;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("EXPRESS_REPORT");
    Expr := MObj.Open(NullAs IEaxAnalyzer;
    //...
    //change express report parameters
    //...
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_EXPRESSREPORT;
    CrInfo.Id := "Copy_"+ MObj.Id;
    CrInfo.Parent := MObj.Parent;
    Expr1 := MB.CreateObject(CrInfo).Edit As IEaxAnalyzer;
    Expr1.CopyFrom(Expr);
    (Expr1 As IMetabaseObject).Save;
End Sub UserProc;

After executing the example parameters of the modified express report are copied and saved together with the new express report.

See also:

IEaxAnalyzer