IPrxReport.Append

Fore Syntax

Append(Source: IPrxReport);

Fore.NET Syntax

Append(Source: Prognoz.Platform.Interop.Report.IPrxReport);

Parameters

Source. Template report identifier.

Description

The Append method adds template report sheets to a report.

Comments

The template report identifier is passed by the Source parameter.

If the regular report and the  template report  added to it have sheets with the same names, these names are corrected when the sheets are copied. The same method is used to adjust the links to ranges in the template report sheets.

Fore Example

Executing the example requires a regular report with the REP_SOURCE identifier and a regular report with the REP_DEST identifier. Create a form, add a button with the Button1 identifier, add a link to the Report system assembly.

Const R_S = "REP_SOURCE";
Const R_D = "REP_DEST";

Class TEST_FORM_405331Form: Form
    Button1: Button;
    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var RepSource, RepDest: IPrxReport;
    Begin
        RepSource := MetabaseClass.Active.ItemById(R_S).Edit As IPrxReport;
        RepDest := MetabaseClass.Active.ItemById(R_D).Edit As IPrxReport;
        RepDest.Append(RepSource);
        (RepDest As IMetabaseObject).Save;
    End Sub Button1OnClick;
End Class TEST_FORM_405331Form;

Clicking the Button1 adds sheets of the regular report with the REP_SOURCE identifier to the regular report with the REP_DEST identifier.

Fore.NET Example

Executing the example requires a regular report with the REP_SOURCE identifier and a regular report with the REP_DEST identifier. Create a .NET form, add a button with the Button1 identifier, then add a link to the Report system assembly.

Imports System;
Imports System.Collections.Generic;
Imports System.ComponentModel;
Imports System.Data;
Imports System.Drawing;
Imports System.Text;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.NET;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Const R_S = "REP_SOURCE";
Const R_D = "REP_DEST";

Public Partial Class OBJ963Form: Prognoz.Platform.Forms.NET.ForeNetForm
    Public Constructor OBJ963Form();
    Begin
        InitializeComponent();
    End Constructor;
    Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Var
        RepSource, RepDest: IPrxReport;
        mb: IMetabase;
    Begin
        mb := self.Metabase;
        RepSource := mb.ItemById[R_S].Edit() As IPrxReport;
        RepDest := mb.ItemById[R_D].Edit() As IPrxReport;
        RepDest.Append(RepSource);
        (RepDest As IMetabaseObject).Save();
    End Sub;
End Class;

Clicking the Button1 adds sheets of the regular report with the REP_SOURCE identifier to the regular report with the REP_DEST identifier.

See also:

IPrxReport