home *** CD-ROM | disk | FTP | other *** search
- * ┌─────────────────────────────────────────────────────────────────────┐ *
- * │ SALELIST.PRG: SALESREPSON LIST │ *
- * │ Copyright (c) 1989 Tech III, Inc. All rights reserved. │ *
- * │ Tech III of San Pedro, California (213) 547-2191. │ *
- * │ "The bridge connecting people and technology."(tm) │ *
- * └─────────────────────────────────────────────────────────────────────┘ *
- @ 00,00 SAY WINTITLE(PROMPT())
-
- * FILE HANDLING
- SELECT salesrep
- SET ORDER TO sal_nam
- GO TOP
-
- * DEFINITIONS
- ON ESCAPE STORE .f. TO printing
- STORE 'PRINTER' TO output
-
- @ 02,02 SAY ' Direct report to: PRINTER/SCREEN: ' ;
- GET output PICTURE '@M PRINTER,SCREEN '
- READ
-
-
- GO TOP
- STORE .t. TO printing
- IF .NOT. YESNO("System is ready to run report.")
- STORE .f. TO printing
- ELSE
- IF output<> "SCREEN "
- IF .NOT. READY2PR()
- STORE .f. TO printing
- ENDIF
- ENDIF
- ENDIF
-
- * START PRINTING
- IF printing
- IF output = 'PRINTER'
- REPORT FORM salelist NOEJECT TO PRINT WHILE printing
- ELSE
- REPORT FORM salelist NOEJECT TO FILE report.txt WHILE printing
- SELECT 0
- USE system
- LOCATE FOR LABEL = 'SALELIST: '
- IF EOF()
- APPEND BLANK
- ELSE
- REPLACE NEXT 1 contents WITH ''
- ENDIF
- REPLACE LABEL WITH 'SALELIST: ' + DTOC(DATE())
- APPEND MEMO contents FROM report.txt
- MODIFY MEMO contents NOEDIT WINDOW reportview
- USE
- SELECT invoice
- ENDIF
- DO standby WITH 'Your report request has been completed.'
- ELSE
- DO standby WITH 'You have canceled this report.'
- ENDIF
- ON ESCAPE
- RETURN
-
- * EOF
-
-