How to: Split Text Templates Into Multiple Files
You can split text templates across several files for size or organizational reasons. Most commonly, you will split a text template into multiple files to allow a portion 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 within a single text template. For more information, see.
To add the include directive to a text template
In Solution Explorer, right-click the text template file that will use the include directive, and then click Open.
The template opens in the editor.
Add the following directive to the template:
<#@ include file ="MyTextTemplateFile2.ReportTemplate"#>
Replace the file name MyTextTemplateFile2.ReportTemplate with the name of your file.
For a detailed example demonstrating splitting a text template into multiple files, see. In the walkthrough, functions defined in a text template are removed from the template and placed in another file for organizational purposes.
To debug text templates you must set the debug parameter of the template directive. For more information, see.
For more information, see.