IPrxSheet.Duplicate

Fore Syntax

Duplicate: IPrxSheet;

Fore.NET Syntax

Duplicate: Prognoz.Platform.Interop.Report.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.

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

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;
    Report: IPrxReport;
    Sheet: IPrxSheet;
    Sheets: IPrxSheets;
Begin
    // Get current repository
    MB := Params.Metabase;
    // 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;

See also:

IPrxSheet