|
Debugging Report Templates
Sometimes, GPP2 will fail to recognize a seemingly perfect variable reference. This is probably the result of a problem in the template, where the original structure ||VAR_NAME|| has been broken into several text pieces.
GPP2 will only recognize a variable reference if it finds the full sequence (including the || delimiters) with no breaks or interruptions.
If a variable reference is not recognized, it will be echoed to the output report without GPP2 substituting the reference with the actual variable contents.
The following cases are known to break a single variable reference so that GPP2 does not recognize it. The table also shows how to correct the template.
Problem |
Explanation |
How to Fix |
Spelling |
If Microsoft Word identifies the variable name as a spelling mistake, it will separate the name from the delimiters. |
Change the variable name to all CAPITAL letters. Microsoft Word usually ignores such words in spelling. Alternatively, suppress spelling. |
Formatting |
If the variable reference contains more than one format (For example, ||USER_NAME|| or ||USER_NAME||), Microsoft Word will separate the name from the delimiters. |
Make sure the entire variable reference uses the same format (For example, ||USER_NAME||). |
To double check this issue in case of problems, open the mht template with a neutral editor (i.e. Microsoft Notepad), search for the required parameter and make sure it meets the rules above. If spaces or other problematic characters are found, delete them and save the mht file.
|