IPrxReport.CopyFromEx

Syntax

CopyFromEx(Source: IPrxReport);

Parameters

Source. The report that must be copied.

Description

The CopyFromEx method removes all sheets, data sources, controls and plugins from the report and copies all contents of the report that must be copied.

Example

Executing the example requires that the repository contains a report with the REG_CFE_1 identifier that will be copied, and a report with the REG_CFE identifier, into which the report will be copied.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report, Report1: IPrxReport;
Begin
    
// Get current repository 
    MB := MetabaseClass.Active;
    
// Get report, into which the report is copied
    MObj := MB.ItemById("REG_CFE").Edit;
    Report := MObj 
As IPrxReport;
    
// Get report that is copied
    Report1 := MB.ItemById("REG_CFE_1").Bind As IPrxReport;
    
// Copy report
    Report.CopyFromEx(Report1);
    
// Save report, into which the report is copied
    MObj.Save;
End Sub UserProc;

After executing the example all sheets, data sources, controls and plugins from the REG_CFE_1 report are copied to the REG_CFE report.

See also:

IPrxReport