Progress
Report Builder
Tutorial


Preparing the Memo File

As in the prior example, the first step is to prepare the text in the memo file. For this example you use the Formlet2.txt memo file. Figure 6–9 shows the text in Formlet2.txt.

NEWMEMO Payment: 
{ 
Dear {@Contact}, 
  
Thank you for your most recent order, All Around Sports order number: {@Order. 
Order-num}. We processed this order on {@Order-Date} and shipped it on 
{@Ship-Date}. The total amount for the order, ${@Order-Total}, is now due. 
Please remit payment as soon as possible as this amount will be past due on 
{@Past-Due-Date}. 
  
Thank you for your prompt attention to this matter. 
  
Sincerely, 
  
  
  
Tanya Schwanda 
Accounts Receivable Manager 
} 
  
NEWMEMO Late-Notice: 
{ 
Dear {@Contact}, 
  
This letter is to notify you that the payment for order number: {@Order. 
Order-num} was due on {@Past-Due-Date} and is now past due. The total amount 
for the order is ${@Order-Total}. 
  
We processed this order on {@Order-Date} and shipped it on {@Ship-Date} in good 
faith. If you do not remit payment within 15 days of the date of this letter, we 
will assess a late fee of 5% of the amount due. 
  
Thank you for your prompt attention to this matter. 
  
Sincerely, 
  
Tanya Schwanda 
Accounts Receivable Manager 
} 

Figure 6–9: Formlet2.txt Memo File

Notice that Formlet2.txt contains two memo fields, one for each version of the letter. Because you can only attach one memo file to a report definition, you must include both versions of the letter in the same memo file. The first memo, Payment, contains the text for a payment request letter. The second version of the letter is in the Late–Notice memo, which notifies the customer that their payment is past due. You indicate which memo to use in the form letter by creating a calculated field to check the past due date of the account, then you include the calculated field in the report layout.

When you look at Figure 6–9, also notice that Formlet2.txt contains the memo identification, memo field start and end, and embedded field name codes. Because you already learned how to insert these codes in the previous example, they are provided for you here. As you look at the embedded field names in Formlet2.txt, you see that there are two field names, Past–Due–Date and Order–Total, that are not fields in the Newsport database. You will create these calculated fields in a later part of this procedure.

Figure 6–10 shows Payment.txt, which is how Formlet2.txt will look after you insert the additional codes.

NEWMEMO Payment: 
{ 
Dear {@Contact}, 
  
       Thank you for your most recent <FHelvetica><B>All Around Sports<N><Times 
New Roman> order, order number: {@Order.Order-num}. We processed this order on 
{@Order-Date} and shipped it on {@Ship-Date}. The total amount for the order, 
${@Order-Total}, is now due. Please remit payment as soon as possible as this 
amount will be past due on {@Past-Due-Date}. 
  
       Thank you for your prompt attention to this matter. 
  
  
  
Sincerely, 
  
Tanya Schwanda~n 
Accounts Receivable Manager 
} 
  
NEWMEMO Late-Notice: 
{ 
Dear {@Contact}, 
  
       This letter is to notify you that the payment for order number: {@Order. 
Order-num} was due on {@Past-Due-Date} and is now past due. The total amount 
for the order is ${@Order-Total}. 
  
       We processed this order on {@Order-Date} and shipped it on {@Ship-Date} 
in good faith. <I>If you do not remit payment within 15 days of the date of this 
letter, we will assess a late fee of 5% of the amount due.<N> 
  
       Thank you for your prompt attention to this matter. 
  
  
Sincerely, 
Tanya Schwanda~n 
Accounts Receivable Manager 
} 

Figure 6–10: Fully Prepared Memo File (Payment.txt)

Follow these steps to properly prepare the memo file:

  1. Open Formlet2.txt in a text editor or word processing program that allows you to save the file as an unformatted text file.
  2. Place a line ending code, ~n, after the writer’s name, Tanya Schwanda, and before the return in both memos to print the writer’s name on a separate line. The line ending code tells Report Builder to start the following text on a new line. You must use this code to start new lines of text in the memo fields because Report Builder ignores single returns in the text. However, Report Builder recognizes multiple returns and creates blank lines for each return after the first one.
  3. Figure 6–11 shows returns in the first memo field. In most places there are multiple returns that provide blank lines. However, in the closing salutation, you do not want a blank line between the author’s name, Tanya Schwanda, and her title. Therefore, you must place a line ending code before the return on the line containing the author’s name.

    NEWMEMO Payment: 
    { 
    Dear {@Contact}, 
      
      Thank you for your most recent <FHelvetica><B>All Around Sports<N><Times 
    New Roman> order, order number: {@Order.Order-num}. We processed this 
    order on {@Order-Date} and shipped it on {@Ship-Date}. The total amount 
    for the order, ${@Order-Total}, is now due. Please remit payment as soon 
    as possible as this amount will be past due on {@Past-Due-Date}. 
      
      Thank you for your prompt attention to this matter. 
      
      
      
    Sincerely, 
      
      
      
    Tanya Schwanda~n 
    Accounts Receivable Manager 
    } 
    

    Figure 6–11: Line Ending Codes

  4. Specify the paragraph indentations (horizontal spacing) in the text. The type of word processor or editor you use dictates whether you use the SPACEBAR or the TAB key to specify spacing:
  5. If the word processor or text editor represents tabs as...
    Then use...
    The tab character (usually indicated by an arrow)
    Use the SPACEBAR. Report Builder treats a tab character as a single space, so that space represented in your memo text as one or more tab characters will not be preserved when you generate the report.
    A number of spaces
    Use TAB. Report Builder preserves spaces inserted in your memo text when these spaces are at the beginning of a paragraph (as in a paragraph indentation). Spaces that are inserted elsewhere in your text are preserved, unless Report Builder’s word-wrap places them against the left margin of your report. In this case, the spaces are eliminated.

    NOTE: Report Builder ignores control characters (such as form feeds) included in your text. It converts both the tab character (character code 9) and a single return into a space.

  6. Specify the font and style codes. In this form letter you want to print the majority of the letter in Times New Roman. (Times New Roman is a TrueType font and should be available if you configure MS–Windows to show TrueType fonts.) You can specify the default font for the text in the memo by applying that font to the memo on the report layout.
  7. NOTE: Do not specify fonts or styles in the word processor or text editor because they will be discarded when you save the file in text-only format.

    1. Specify Helvetica for the All Around Sports logo by positioning the cursor directly before “All Around Sports” and typing <FHelvetica>. Report Builder automatically makes the font the point size applied to the memo in the report layout unless you specify otherwise. In this example, the applied point size is 12-point.
    2. To return to Times New Roman for the rest of the letter, position the cursor directly after “All Around Sports” and type <FTimes New Roman>. You must type the font name as it appears on the Report Builder font list box, including all the necessary spaces and capitalization.
    3. To make the All Around Sports logo bold, position the cursor between the Helvetica font code (<FHelvetica>) and “All Around Sports” and type <B> for bold. This code instructs Report Builder to make all text following the code bold.
    4. To limit the bold style to the All Around Sports logo, position the cursor between “All Around Sports” and <FTimes New Roman> and type <N> for normal. This code instructs Report Builder not to apply a style to the text following the code.
    5. To make the sentence regarding the penalty fee in the Late–Notice memo more noticeable, italicize the sentence by entering an <I> before the sentence begins.
    6. To limit the italic style to that sentence, type <N> at the end of the sentence to return to normal text style.
  8. Save the prepared text file as Paylet.txt.
  9. Figure 6–12 shows how your memo file should look.

    NEWMEMO Payment: 
    { 
    Dear {@Contact}, 
      
      Thank you for your most recent <FHelvetica><B>All Around Sports<N><Times 
    New Roman> order, order number: {@Order.Order-num}. We processed this 
    order on {@Order-Date} and shipped it on {@Ship-Date}. The total amount 
    for the order, ${@Order-Total}, is now due. Please remit payment as soon 
    as possible as this amount will be past due on {@Past-Due-Date}. 
      
      Thank you for your prompt attention to this matter. 
      
    Sincerely, 
    Tanya Schwanda~n 
    Quality Assurance Manager 
    } 
      
    NEWMEMO Late-Notice: 
    { 
    Dear {@Contact}, 
      
      This letter is to notify you that the payment for order number: {@Order. 
    Order-num} was due on {@Past-Due-Date} and is now past due. The total 
    amount for the order is ${@Order-Total}. 
      
      We processed this order on {@Order-Date} and shipped it on {@Ship-Date} 
    in good faith. <I>If you do not remit payment within 15 days of the date 
    of this letter, we will assess a late fee of 5% of the amount due.<N> 
      
      Thank you for your prompt attention to this matter. 
    Sincerely, 
      
    Tanya Schwanda~n 
    Accounts Receivable Manager 
    } 
    

    Figure 6–12: Embedded Font, Point Size, and Style Codes

    When you attach Paylet.txt to a report, Report Builder prints the text in the specified fonts (Times New Roman and Helvetica) if these fonts are available on the current printer. These fonts override any font applied to the memo field on the report layout. However, if you apply a style to the memo field in the report layout or if you specify only a style in the memo text, Report Builder tries to combine the style with the font applied to the memo on the report layout.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095