PRB: Printer Not Ready When Print Long Doc on Local Printer

Last reviewed: November 9, 1994
Article ID: Q122589
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6, 2.6a

SYMPTOMS

When 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.

CAUSE

This 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.

RESOLUTION

Use 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 One

Add 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 Two

Add 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=999999

The number specifies the number of FoxPro retries before timing out. The largest value recognized is one less than a million, which is 999999.

Solution Three

Include 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
KBCategory: kbprint kbprb
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 9, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.