Show TOC

 Inclusion of Document Templates

Use

With this function, you include a document template in another document template. This allows you, for example, to subdivide complex templates into individual templates and thus make them easier to handle. In addition, for parts that are identical in several templates you can create them in a separate template and include this in all relevant templates. This makes editing and managing document templates easier.

Recommendation Recommendation

Do not use included templates within repeating groups because this has a negative impact on performance.

End of the recommendation.

During report generation, the system expands the included template and fills its symbols with data.

Prerequisites

The following prerequisites must be fulfilled before you can include a document template:

  • The template has one of the following statuses:

    • In Work (IW)

    • Released (RE)

  • The syntax is free of errors.

  • The template can also be used alone.

Features

The control symbol for including a template has report symbol type 20. The string <20INCLUDE introduces the syntax. Following this, parentheses enclose the template, version, and document type, each separated by commas. The template is enclosed in double quotation marks. The “greater than” (>) sign closes the syntax.

Example Example

<20INCLUDE("Test",01,SBV)> means that the template Test with version 01 is included. The template has the document type report template ( SBV ).

End of the example.

Specifying a version and document type is optional:

  • If you do not specify a version, the system uses the following version of the template:

    • When testing the layout of a report, the system uses the newest version that has the status In Work (IW) or Released (RE).

    • When creating a report as the result of a report request, the system uses the newest released version.

  • If you do not specify a document type, the system uses the document type of the template into which the template is to be included.

You can include templates over several levels, that is, an included template can also contain included templates. However, you must not allow loops to result.

Example Example

The following is not permitted: template A contains template B, template B contains template C, and template C contains template A.

End of the example.

In the hit list for document templates, the function with the quick info text Where-Used List is available. You can use this to search for document templates that contain one or more document templates that you selected in the hit list.

If you change a template or cancel the release, this can also affect the templates in which the template has been included. To inform you whether the affected templates need to be checked again, the system makes the following status changes:

  • If you edit a template, all templates with the status In Work in which the edited template is included directly or indirectly are given the status For Checking .

If you cancel the release of a template, all templates with the status In Work or Released in which the no longer released template is included directly or indirectly are given the status In Work . As the template has not yet been changed, the dependent templates need to be checked. You may need to release the template again.

When checking templates, the system expands the included templates temporarily and checks them in the context of the complete template. This is necessary because including templates can cause errors, for example, in the case of repeating groups in which an included template is located. If an error occurs here, the system sets the status Errors for the template into which the template is included and an error message is displayed.

You can only release a template when all the templates included in it are released. You can only set a template to historical or delete it if it is not included in any other template.

When the system expands an included template during report generation, it uses the Microsoft Word function for inserting files. The possibilities and constraints for this function therefore also apply to the inclusion of document templates. This means:

  • If the template into which the template is included has a header and footer, the system does not transfer the header and footer from the included template. If the template into which the template is included does not have a header and footer, the system transfers the header and footer from the included template.

  • The system transfers the styles from the included template to the template. Here, it does not transfer styles that already exist. It replaces these styles in the expanded included template with those from the template into which the template is included.

  • In Microsoft Word, documents cannot be inserted in other documents in certain cases. For example, a document that contains a text box or other drawing objects cannot be inserted in text boxes, legends, comments, footnotes, and endnotes. In these cases, including document templates is also not possible and errors occur during report generation.

Activities

To include a document template in another document template, proceed as follows:

  1. Position the cursor in the template at the place at which the template is to be included and choose with the quick info text Include Template .

  2. Select the template you want to include and confirm your entry.

  3. Check and save the template.