PRB: ?/?? Output Not Using the Specified Printer Driver

Last reviewed: April 18, 1995
Article ID: Q109852
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

SYMPTOMS

After you have set a printer driver, ?/?? output does not use the specified printer driver.

CAUSE

When you are printing with ?/??, the PDDOCST and PDDOCEND procedures in the GENPD.APP program are not called automatically; they must be called manually.

RESOLUTION

To avoid this problem, make sure you manually call the PDDOCST and PDDOCEND procedures. For example, the following code corrects the example shown below in the "More Information" section:

   SET PDSETUP TO "Condensed"
   SET PRINTER TO LPT1
   SET PRINTER ON
   SET LIBRARY TO LOCFILE("driver2.plb")
   ? PDDOCST(_PLENGTH,128)  && substitute 128 with desired page width
   ? "This is a test"
   ? PDDOCEND()
   SET PRINTER OFF
   SET PRINTER TO

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a printer driver called "Condensed" that prints 16.7 characters per inch (cpi).

  2. Execute the following code:

          SET PDSETUP TO "Condensed"
          SET PRINTER TO LPT1
          SET PRINTER ON
          ? "This is a test"
          SET PRINTER OFF
          SET PRINTER TO
    

The text "This is a test" does not print in condensed print.

REFERENCES

Printer driver program procedures charts:

"Developer's Guide," version 2.0, page 19-14 "Developer's Guide," version 2.5, page D17-14


Additional reference words: FoxDos 2.00 2.50 2.50a 2.50b
KBCategory: kbprg 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: April 18, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.