IPrxReport.CopyFromEx

Fore Syntax

CopyFromEx(Source: IPrxReport);

Fore.NET Syntax

CopyFromEx(Source: Prognoz.Platform.Interop.Report.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.

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Report;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report, Report1: IPrxReport;
Begin
    
// Get current repository 
    MB := Params.Metabase;
    
// 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;

See also:

IPrxReport