IPrxSheet.Duplicate

Syntax

Duplicate: IPrxSheet;

Description

The Duplicate method duplicates regular report sheet.

Comments

On duplicating a sheet, all included into report visualizers, its settings and location, selected source and determined selection, determined dimension synchronization are copied.

Example

Executing the example requires a regular report with the REPORT_DUPL identifier.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
    Sheet: IPrxSheet;
    Sheets: IPrxSheets;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Get report
    Report := MB.ItemById("REPORT_DUPL").Edit As IPrxReport;
    // Get collection of regular report sheets
    Sheets := Report.Sheets;
    // Get regular report sheet
    Sheet := Report.Sheets.Item(0);
    // Duplicate sheet
    Sheet.Duplicate;
    // Save report
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, a new sheet, which is the copy of existing one is added to the regular report.

See also:

IPrxSheet