home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR8 / EASYLET.ZIP / DEMO.TXT < prev    next >
Text File  |  1993-09-20  |  2KB  |  72 lines

  1.               +-----------------------------------------+
  2.               |             EasyLet Demo                |
  3.               +-----------------------------------------+
  4.  
  5. This an example of how EasyLet code can be used to create a
  6. letter and then merge it with specific information in a database.
  7.  
  8.  
  9. 1. Create a standard letter head, DENTAL.HDR
  10.  
  11.  
  12. [.// letter head for JAWS, Inc.
  13.         The reason to put the header in a separate file is to let all
  14.         company letters to use the same header. In case of address or
  15.         phone number change, all you need is to change one file.
  16. .]
  17.  
  18. [.!linech("=").]
  19. [.!lrjust("JAWS, Inc.","").]
  20. [.!lrjust("1180 Spring Centre South Blvd", "").]
  21. [.!lrjust("Suite 211", "Tel.    (407) 774-7734").]
  22. [.!lrjust("Altamonte Springs, FL 32714", "Fax.    (407) 774-6750").]
  23. [.!linech("=").][..][.lf1.]
  24. [.exit.]
  25.  
  26.  
  27. 2. Create an address block that calls fields from your data
  28.   base.    ADDR.BLK
  29.  
  30. [.?trim(field->firstname)+" "+field->lastname.][..]
  31. [.?field->address.][..]
  32. [.?citystzip(field->city,field->state,field->zip).][..]
  33.  
  34.  
  35. 3. Create the text of the letter and add the header and address
  36.    blocks.
  37.  
  38. [.LM 5.][.RM 70.]
  39. [.INCLUDE dental.hdr.][.lf2.]
  40. [.JUSTR.]Account :[.?field->account.][..]
  41. [.JUSTL.][.TDATE.][.LF.]
  42. [.INCLUDE addr.blk.][.LF2.]
  43. Dear [.?trim(field->firstname).]:[.lf1.]
  44. We are writing to call your attention to a past-due bill you may
  45. have ovelooked. Your account shows a balance due of
  46. $[.?field->balan_due.] for dental work done on [.?field->date.].
  47. [.lf.]
  48. A self-addressed envelope is enclosed for your convenience. We
  49. have been happy to serve you.[.lf2.]
  50. [.text
  51. Sincerely,
  52.  
  53. David P. Sanders, D.D.S.
  54. .]
  55. [.ff.]
  56. [.exit.]
  57.  
  58. 4. Create the task to do the merge and generate the
  59.   letters.  BALANCE.TSK
  60.  
  61. [.LM 5.][.RM 70.]
  62. [.!dbuse("datafile.dbf").] [.// use this database .]
  63. [.DBSCAN field->balan_due > 0.][.// check for any record that has
  64.                                     a balance due.
  65.                                .]
  66. [.process balance.let .]
  67. [.ENDSCAN.]
  68. [.!dbclose().]
  69. [.EXIT.]
  70.  
  71.  
  72.