In this section, we illustrate a sample template file: Balance.rep. We have not included the .rpw files for this report, so that we can ignore the special commands to Word.
The following paragraphs are from the Statement of Financial Condition (Personal Balance Sheet) text analysis file called BALANCE.REP. We are have read the report template file into Notepad.
We explain the variables and the special command words in the next section.
The next screen image shows the next section of the report.
Notice that the variables are all preceded by a tilde (~) and that the variable names themselves are entirely in capital letters. You must use the variables for that report (as listed in List of Variables Used in the Template Reports section). Notice, though, that you can emphasize other words in the text by capitalizing them also.
You must also capitalize the command words IF, ELSE, ELSEIF, and THEN. You must also precede IF, ELSE, and ELSEIF with a tilde. Do NOT use a tilde with THEN.
Blank lines are important. They terminate the IF-THEN-ELSE statement.
As we have modified the text in the previous example, we have told MasterPlan to print the first paragraph unconditionally, since we have not enclosed it within an IF statement.
The structure of Paragraph 2 is much more complex. The value of BAPLASS determines which part of that paragraph MasterPlan will print.
In BAPLASS, MasterPlan has previously stored the percent of liquid assets to total assets. If BAPLASS is greater than 50 (%), then MasterPlan will print the first sentence of the paragraph.
If BAPLASS is between 20 and 50, then MasterPlan will print the second sentence. In this context, ELSEIF means, "If the first condition is false then check BAPLASS to see if it is greater than 20."
If neither of the above conditions are true, then MasterPlan will print the sentence following the ELSE command.
The third paragraph shows how MasterPlan can print a paragraph if a condition is true or leave it out entirely if the condition is false.