home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / SAMPLE / INVSALES.PRG < prev    next >
Encoding:
Text File  |  1989-11-09  |  1.7 KB  |  63 lines

  1. * ┌─────────────────────────────────────────────────────────────────────┐ *
  2. * │  INVSALES.PRG: SALES BY ITEM REPORT                                 │ *
  3. * │  Copyright (c) 1989 Tech III, Inc. All rights reserved.             │ *
  4. * │  Tech III of San Pedro, California      (213) 547-2191.             │ *
  5. * │  "The bridge connecting people and technology."(tm)                 │ *
  6. * └─────────────────────────────────────────────────────────────────────┘ *
  7. ACTIVATE WINDOW screensim
  8. @ 00,00 SAY WINTITLE(PROMPT())
  9.  
  10. * FILE HANDLING
  11. SELECT lines
  12. SET ORDER TO lns_itm
  13. * DEFINITIONS
  14. STORE .t. TO printing
  15. ON ESCAPE STORE .f. TO printing
  16. STORE 'PRINTER' TO output
  17. @ 02,00 SAY 'Direct report to PRINTER/SCREEN: ' GET output ;
  18. PICTURE '@M PRINTER,SCREEN '
  19. READ
  20.  
  21. GO TOP
  22. STORE .t. TO printing
  23. IF .NOT. YESNO("System is ready to run report.")
  24.   STORE .f. TO printing
  25. ELSE
  26.   IF output<> "SCREEN "
  27.     IF .NOT. READY2PR()
  28.       STORE .f. TO printing
  29.     ENDIF
  30.   ENDIF
  31. ENDIF
  32.  
  33. * START PRINTING
  34. IF .NOT. printing
  35.   DO standby WITH 'You have canceled this report.'
  36. ELSE
  37.   IF output = 'PRINTER'
  38.     REPORT FORM invsales NOEJECT TO PRINT WHILE printing
  39.   ELSE
  40.     REPORT FORM invsales NOEJECT TO FILE report.txt WHILE printing
  41.     SELECT 0
  42.     USE system
  43.     LOCATE FOR LABEL = 'INVSALES: '
  44.     IF EOF()
  45.       APPEND BLANK
  46.     ELSE
  47.       REPLACE NEXT 1 contents WITH ''
  48.     ENDIF
  49.     REPLACE LABEL WITH 'INVSALES: '  + DTOC(DATE())
  50.     APPEND MEMO contents FROM report.txt
  51.     MODIFY MEMO contents NOEDIT WINDOW reportview
  52.     USE
  53.     SELECT invoice
  54.   ENDIF
  55.   DO standby WITH 'Your report request has been completed.'
  56. ENDIF
  57. SET ORDER TO lns_inv
  58. CLEAR
  59. DEACTIVATE WINDOW screensim
  60. RETURN
  61.  
  62. *eof
  63.