How to: Split Text Templates into Multiple Files
Updated: July 2008
You can split text templates into several files for size or organizational reasons. For example, you could split a text template into multiple files to enable part of a text template to be reused in other templates. The following procedure describes how to use the include directive to use multiple text template files in a single text template. For more information, see Directive Syntax (Domain-Specific Languages).
To add the include directive to a text template
Add a directive that resembles the following to the template.
<#@ include file ="MyTextTemplateFile2.ReportTemplate"#>
For a detailed example that demonstrates how to split a text template into multiple files, see Walkthrough: Creating and Running Text Templates. In the walkthrough, the system removes functions defined in a text template from the template and puts them in another file for organizational purposes.