PRB: Printer Not Ready When Print Long Doc on Local PrinterLast reviewed: November 9, 1994Article ID: Q122589 |
The information in this article applies to:
SYMPTOMSWhen using FoxPro for MS-DOS on a stand-alone (non-networked) computer or on a networked computer that has a local printer, you may receive the message "Printer Not Ready" when printing a lengthy document or report to the MS-DOS PRN printer, even though the printer is in the middle of printing that item.
CAUSEThis can happen because the printer's memory buffer is full and unable to accept more of the document for the moment. It can happen even though the memory buffer is large, provided the document is even larger. It can also happen with printers that have no memory buffer.
RESOLUTIONUse any one of the following three solutions to avoid the problem by instructing both MS-DOS and FoxPro to wait until the printer is able to accept more of the document.
Solution OneAdd the following line to the AUTOEXEC.BAT file. Then reboot the computer:
MODE LPTn RETRY=P (or, "MODE LPTn,,P")Here n (a numeric value from 1 to 3) is the number of the parallel printer port.
Solution TwoAdd the following line to the FoxPro CONFIG.FP file. The command instructs MS-DOS to continue retrying until the printer accepts input or the number of tries has been exceeded. It is valid for any IBM-compatible or Epson- compatible printer, even those without a print buffer.
TIME=999999The number specifies the number of FoxPro retries before timing out. The largest value recognized is one less than a million, which is 999999.
Solution ThreeInclude a user-defined function (udf) in the program that calls the FoxPro report. Here's an example:
REPORT FORM <docname.frx> TO PRINT * include, for example, the following four line function: FUNCTION pauser PARAMETERS no_param =INKEY(5) && pause for 5 seconds waiting for keystroke that never comes RETURN ""The report definition file (<docname.frx>) should contain a single character variable in the page footer band containing this expression:
pauser()This calls the pauser() function contained in the calling program. The numeric value, in this case 5, denotes seconds; it can be any value from 0 (an indefinite wait) to 65535.
|
Additional reference words: FoxDos 2.00 2.50 2.50a 2.50b 2.60 2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |