CopyFrom(Source: IEaxAnalyzer);
Source: Express report data of which is to be copied to the current report.
The CopyFrom method copies parameters of the report passed by the Source parameter, to the current express report.
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 Main;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
Expr, Expr1: IEaxAnalyzer;
CrInfo: IMetabaseObjectCreateInfo;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("EXPRESS_REPORT");
Expr := MObj.Open(Null) As 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 Main;
After executing the example parameters of the modified express report are copied and saved together with the new express-report.
See also: