Append(Source: 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.
See also: