IPrxReport.CopyFrom

Syntax

CopyFrom(Source: IPrxReport);

Parameters

Source - regular report, from which the sheets should be copied.

Description

The CopyFrom method removes all sheets, data sources, controls and plugins from the regular report and copies sheets from the source passed by the Source parameter.

Example

To execute the example, add links to the Metabase and Report system assemblies.

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report, Report1: IPrxReport;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("Report").Edit;
    Report := MObj As IPrxReport;
    Report1 := MB.ItemById("Report1").Bind As IPrxReport;
    Report.CopyFrom(Report1);
    MObj.Save;
End Sub Main;

After executing the example sheets of the regular report with the Report identifier are copied from the regular report with the Report1 identifier.

See also:

IPrxReport