home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Mid_way
-
- PARAMETERS the_way, ttitles, bkpoint, the_page
-
- the_page = IF(PCOUNT() = 4, -1, the_page)
-
- DO CASE
- CASE the_way = 1
-
- * If printing to the screen, check to see if the line count
- * is > 15. If it is not, return TRUE to continue
- * the printing; otherwise, interrupt the printing with a prompt to
- * continue. If printing is not to the screen, return a FALSE value.
- * If printing is to proceed, redisplay the header and re-set the counter
-
- IF bkpoint > 18
- @ 24,00 SAY "Press Any Key for Next Screen or Q to QUIT"
- IF QWAIT("Q")
- bkpoint = 70
- RETURN(.F.)
- ENDIF
-
- bkpoint = 7
- @ 8,0 CLEAR
- RETURN(.T.)
- ELSE
- RETURN(.T.)
- ENDIF
-
- CASE the_way = 2
- IF TYPE("scrpage") = "U"
- scrpage = .F.
- ENDIF
-
- IF INKEY() # 27
- IF bkpoint > 55
- IF scrpage .AND. the_page <> -1
- ?
- ?
- say_what = "Page " + LTRIM(TRIM(STR(the_page)))
- ? Mess_cent(say_what,40)
- the_page = the_page + 1
- ENDIF
- EJECT
- Header_p(ttitles, the_way, 79)
- bkpoint = 7
- ENDIF
-
- RETURN(.T.)
- ELSE
- SET PRINT OFF
- SET CONSOLE ON
- Clear_area()
- temp_var = "ESC to abort or any other key to print"
- @ Wrow(1),Center(temp_var, 40) SAY temp_var
- IF INKEY(0) = 27
- RETURN(.F.)
- ELSE
- IF !ISPRINTER()
- Clear_area()
- @ Wrow(1), Wcol(3) SAY "Printer NOT on-line. Any key to RETURN"
- INKEY(0)
- RETURN(.F.)
- ENDIF
- ENDIF
- ENDIF
- temp_var = "Resume printing report. One Moment!"
- Clear_area()
- @ Wrow(1),Center(temp_var,40) SAY temp_var
- SET CONSOLE OFF
- SET PRINT ON
- RETURN(.T.)
- OTHERWISE
- RETURN(.T.)
- ENDCASE
-
- * End of File
-
-