home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / clarion / tools.zip / TOOLS.COM / GETPRDEV.FUN < prev    next >
Text File  |  1988-11-13  |  2KB  |  55 lines

  1. !-------------------------------------------------------------------------------
  2. ! GET REPORT DEST PRINTER / DISK
  3. !-------------------------------------------------------------------------------
  4. GETPRDEV FUNCTION
  5.  
  6. PRTTO_MSG    SCREEN      WINDOW(5,26),AT(6,26),HUE(7,0,0)
  7.            ROW(4,1)      PAINT(2,15),TRN
  8.            ROW(1,1)      STRING('╓─{24}╖'),ENH
  9.            ROW(2,1)      STRING('║<0{24}>║'),ENH
  10.            ROW(3,1)      STRING('╙─{14}╖<0{9}>║'),ENH
  11.            ROW(4,16)  STRING('║<0{9}>║'),ENH
  12.            ROW(5,16)  STRING('╙─{9}╜'),ENH
  13.            ROW(2,3)      STRING('Send output to')
  14.            ROW(1,13)  MENU,USE(PR1:PSTATUS),HLP('GETPRDEV'),REQ
  15.            ROW(2,18)    STRING('Printer')
  16.            ROW(3,18)    STRING('Screen')
  17.            ROW(4,18)    STRING('Disk')
  18.          .          .
  19.  
  20. PRTFNAM_MSG  SCREEN      WINDOW(5,51),AT(11,16),HLP('PRTFNAME'),HUE(7,0,0)
  21.            ROW(2,2)      STRING('╓─{47}╖'),ENH
  22.            ROW(3,2)      STRING('║<0{47}>║'),ENH
  23.            ROW(4,2)      STRING('╙─{47}╜'),ENH
  24.            ROW(3,4)      STRING('Enter File Name:')
  25.          COL(20)  ENTRY(@S29),USE(PR1:DISKFILE),REQ,LFT,UPR
  26.          .
  27.  
  28. PRTPR1_GRP GROUP,PRE(PR1)
  29. PSTATUS         STRING(1)
  30. DISKFILE     STRING(30)
  31.        .
  32.  CODE
  33.  
  34.    ALERT                  !CLEAR CTRL KEYS
  35.    ALERT(F10_KEY)              !ENABLE THE CTRL KEY'S
  36.    PR1:PSTATUS = 'P'              !SET PRINTER
  37.    OPEN(PRTTO_MSG)              !OPEN WINDOW
  38.    ACCEPT                  !GET REPLY
  39.    IF KEYCODE() = F10_KEY THEN RETURN(1).
  40.    IF PR1:PSTATUS = 'P' THEN          !PRINTER
  41.      GBL:REPORTDEV = PRO:REPORTDEV    !SET DEVICE
  42.      GBL:LABELDEV  = PRO:LABELDEV     !SET DEVICE
  43.    ELSIF PR1:PSTATUS = 'S' THEN          !SCREEN
  44.      GBL:REPORTDEV = 'CON'          !SET DEVICE
  45.      GBL:LABELDEV  = 'CON'          !SET DEVICE
  46.    ELSE                      !DISK
  47.      PR1:DISKFILE = 'REPORT.RPT'      !SET DEFALUT NAME
  48.      OPEN(PRTFNAM_MSG)              !OPEN WINDOW
  49.      ACCEPT                  !GET REPLY
  50.      IF KEYCODE() = F10_KEY THEN RETURN(1).
  51.      GBL:REPORTDEV = PR1:DISKFILE     !SET FILE NAME
  52.      GBL:LABELDEV  = PR1:DISKFILE     !SET FILE NAME
  53.    .                      !END IF
  54.    RETURN(0)
  55.