home *** CD-ROM | disk | FTP | other *** search
/ The Best of the Best / _.img / 02192 / logbook.arc / LOGPRINT.PRG < prev    next >
Text File  |  1987-11-20  |  3KB  |  93 lines

  1. * LOGPRINT  THIS PROGRAM PRINTS A LOG IN DATE ORDER
  2. * COPYRIGHT Joe Kasser G3ZCZ 1985. VER 87/11/20-1
  3. * CALLED BY LOGBOOK
  4.  
  5. * STRUCTURE FOR FILE:  B:logbook.DBF
  6.  
  7. * FLD       NAME      TYPE WIDTH   DEC
  8. * 001     DATE         C    008
  9. * 002     TIME         C    004
  10. * 003     BAND         C    003
  11. * 004     CALL         C    010
  12. * 005     RX           C    003
  13. * 006     TX           C    003
  14. * 007     MODE         C    004
  15. * 008     POWER        C    004
  16. * 009     QSLSENT      C    001
  17. * 010     QSLRX        C    001
  18. * 011     COMMENTS     C    010
  19.  
  20. STORE 99  TO linecount
  21. STORE  1  TO pagecount
  22. STORE  0  TO first
  23. STORE  1  TO qsonumber
  24. STORE ' ' TO page
  25. STORE ' ' TO firste
  26. STORE 0   TO pnumber
  27.  
  28. CLEAR
  29.  
  30. USE &logbook
  31. GOTO BOTTOM
  32. IF (EOF() .OR. BOF())
  33.    ? 'LOGBOOK IS BLANK'
  34. ELSE
  35.    ACCEPT 'FIRST ENTRY (Number of entry to be displayed ) ? ' TO firste
  36.    ACCEPT 'STARTING PAGE ? ' TO page
  37.    STORE VAL(page) TO pagecount
  38.    STORE VAL(firste) TO first
  39.    ACCEPT 'Offset From Previous Log (If none, enter 0) ? ' to pnumber
  40.    STORE first - VAL(pnumber) TO first
  41.    IF first < 1                                                                  
  42.       ? 'entry - offset is negative'                                             
  43.    ELSE                                                                                                                                                           
  44.       * rem at BOTTOM                                                            
  45.       IF RECNO() < first                                                               
  46.          STORE RECNO() TO first                                                        
  47.          ? 'Numbering Error'
  48.       ENDIF
  49.  
  50.       STORE ' ' TO df
  51.       ACCEPT 'Do you want a hard copy (Y/N) ? ' TO df
  52.       df = UPPER(df)
  53.       IF df = 'Y'
  54.          SET PRINT ON
  55.       ENDIF
  56.  
  57.       GOTO first
  58.       STORE first + VAL(pnumber) TO qsonumber
  59.       qsonumber = INT(qsonumber)
  60.       pagecount = INT(pagecount)
  61.       DO WHILE .NOT.EOF()
  62.       
  63.          IF linecount > 57
  64.             if df = 'Y'
  65.                EJECT
  66.             endif
  67.             ? 'LOGBOOK PRINTOUT  ',callsign,'PAGE',pagecount                     
  68.             STORE pagecount + 1 TO pagecount                                     
  69.             ?                                                                    
  70.             ?                                                                    
  71.             ?  'LINE NUMBER  DATE    TIME BND  CALL      '
  72.             ?? 'RX  TX  MODE PWR S R COMMENTS'                                                    
  73.             ?  '----------------------------------'       
  74.             ?? '------------------------------------------'                                             
  75.             STORE 3 TO linecount                                                 
  76.          ENDIF                                                            
  77.          ? qsonumber,date,time,band,call,rx,tx,mode,power,qslsent,qslrx,comments
  78.          STORE linecount + 1 TO linecount
  79.          STORE qsonumber + 1 TO qsonumber
  80.          SKIP
  81.       ENDDO
  82.    ENDIF
  83.    IF df = 'Y'
  84.        EJECT
  85.        SET PRINT OFF
  86.    ENDIF
  87.    ?
  88.    RELEASE pnumber,df,firste,page,linecount,qsonumber,pagecount,first
  89. ENDIF
  90. WAIT
  91. USE
  92. RETURN
  93.