
* UNDLINES.CMD -- A sample program to demonstrate the use of print commands
*                 for Epson or Star dot matrix printers in dBASE and how to 
*                 underline headings when the print commands for this will 
*                 not work properly.  Any printout of this program should 
*                 be printed in condensed print to give a reasonable view 
*                 of spacing required for the subheadings.
*                    - W. Ragsdale (5/30/86) -

SET TALK OFF
SET EJECT OFF
SET RAW ON
* Above eliminates spaces between columns.
ACCEPT 'ENTER DATE' TO RDATE
ERASE
STORE 1 TO PG           
* Above starts page count
USE B:MEMBERS
*SORT ON SURNAME TO B:MEMLIST
*USE B:MEMLIST
SET FORMAT TO PRINT
SET PRINT ON
@ 1,1 SAY CHR(15)       
* Above sets print to condensed mode.
@ 2,2 SAY 'PAGE'
?? PG                  
* Above is same as '?', except there is no carriage return.
@ 3,2 SAY 'DATE'
@ 3,8 SAY RDATE         
@ 3,17 SAY CHR(18)      
* Above cancels condensed print
@ 5,1 SAY CHR(14)       
* Above sets print to expanded mode, it is cancelled by a carriage return.
@ 5,13 SAY 'CLUB MEMBERS'  
@ 6,1 SAY CHR(15)       
? '  NAME' + CHR(13) + '  ____',
* In dBASE, this is the only way to underline on Epson or Star printers.
* Headings are measured from the previous heading, but underlining is 
* measured from the left margin.
?? '                    ADDRESS' + CHR(13) 
?? + '                          _______',
?? '                   CITY' + CHR(13) 
?? + '                                                    ____',
?? '            ST' + CHR(13) 
?? +'                                                                    __'
?? '  ZIP  ' + CHR(13)
?? +'                                                                        ___'
?? '   HOME PHONE' + CHR(13)
?? +'                                                                              ____ _____'
?? '  BUS. PHONE' + CHR(13)
?? +'                                                                                          ____ _____'
?? '    COMMENTS' + CHR(13)
?? +'                                                                                                        ________'
STORE 7 TO X
* This sets line count at 7
DO WHILE .NOT. EOF
  ? CHR:NAME,' ',SURNAME,'  ',ADDRESS,'  ',CITY,'  ',STATE,' ',ZIP,'  ',
  ?? PHONE,'  ',FONE:BUS,'  ',COMMENTS,'  ',#
  * The # is a request for the record number; if file is sorted, this will
  * provide an accurate item count.  
  ?                     
  * Above will provide a blank line to double space the report.
  STORE X+2 TO X
  IF X>55
    EJECT
    @ 1,1 SAY CHR(15)
    @ 2,2 SAY 'PAGE'
    STORE PG+1 TO PG    
    ?? PG               
    @ 3,2 SAY 'DATE'
    @ 3,8 SAY RDATE         
    @ 3,17 SAY CHR(18)      
    @ 5,1 SAY CHR(14)       
    @ 5,13 SAY 'CLUB MEMBERS'  
    @ 6,1 SAY CHR(15)
    ? '  NAME' + CHR(13) + '  ____',
    ?? '                    ADDRESS' + CHR(13) 
    ?? + '                          _______',
    ?? '                   CITY' + CHR(13) 
    ?? + '                                                    ____',
    ?? '            ST' + CHR(13) 
    ?? +'                                                                    __'
    ?? '  ZIP  ' + CHR(13)
    ?? +'                                                                        ___'
    ?? '   HOME PHONE' + CHR(13)
    ?? +'                                                                              ____ _____'
    ?? '  BUS. PHONE' + CHR(13)
    ?? +'                                                                                          ____ _____'
    ?? '   COMMENTS' + CHR(13)
    ?? +'                                                                                                        ________'
    STORE 7 TO X
  ENDIF
  SKIP
ENDDO
? CHR(27)+CHR(66)+CHR(2)
* Above is for Elite size print (12 per inch)
TEXT                     
 The above listing of active members is updated once each month based on records at 
 the end of the month and a new listing will be completed by the tenth of the month.
ENDTEXT
?? CHR(18),
?? CHR(13)
* Above is a carriage return to insure that the last line is printed
SET EJECT OFF
SET PRINT OFF
CANCEL

   