Append(Source: IPrxReport);
Append(Source: Prognoz.Platform.Interop.Report.IPrxReport);
Source. Template report identifier.
The Append method adds template report sheets to a report.
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.
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.
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: