Microsoft KB Archive/88666

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a

-

SUMMARY
If you are having a problem printing, the following procedure can help you to establish what is causing the problem.

 From the Window menu, choose Debug.  In the left side of the Debug window, type the variables in the left column below:      SYS(6)          && Printer Device SYS(13)        && Printer Status SYS(101)       && Device Setting SYS(102)       && Printer Setting SYS(2005)      && Resource File in use _GENPD         && GENPD.APP in use _PDRIVER       && Printer Driver File _PDSETUP       && Printer Driver Setup 

Specific printing problems and what to check:

 Report is printing ASCII characters or is not using the printer driver setup you want.

 Before you call up your report, check _PDSETUP in DEBUG and see what printer driver setup, if any, is selected. Then, modify your report while DEBUG is still open and check to see if _PDSETUP changes. If so, then you have specified a printer driver in your report.  If the driver you want to use is the one specified in your report, include keyword PDSETUP following your command to print the report. For example:         REPORT FORM &lt;name) TO PRINT PDSETUP   If the driver you want to use is the one specified by your environment, (either in your CONFIG.FP file or by issuing the command SET PDSETUP TO &quot; &quot;, DO NOT use the keyword PDSETUP when you issue the PRINT command. For example: <pre class="CODESAMP">        REPORT FORM TO PRINT </li></ol> </li> Printing options are dimmed (unavailable).

 Check _GENPD in your Debug window to see if GENPD.APP can be located. GENPD.APP must be available in order to print.</li> If you are distributing an .EXE file, GENPD.APP must be included in the project and marked as Excluded. To do this, modify your project, choose Add, select Application and locate GENPD.APP. FoxPro should automatically mark GENPD.APP as excluded. GENPD.APP, DRIVER2.PLB, PSAPI.PLB, FOXSWAP.COM, and PROAPI16.EXE (if on an 80386 machine) must then be distributed with your .EXE file.

NOTE: PROAPI16.EXE is no longer needed with FoxPro versions 2.5 and later.</li></ol> </li> Report is printing ASCII characters instead of boxes.

Printer drivers were updated with patches of new releases. Make sure you have applied the latest patches. If you are using the latest release of the drivers and you are still having this problem, the setup is trying to print with the IBM character set. In this case, you have the following choices:

<ul> Choose a printer font on your printer that will print the IBM character set. For example, on a Hewlett-Packard printer, choose PC-8.</li> Modify the P_CODES.DBF P_startup to include the escape sequence needed to place your printer in the font that will use the IBM character set.</li></ul> </li> ASCII text files are not using your printer driver setup.

<ul> ASCII text files will not use selected printer drivers. They will always use the generic text printer driver (the default printer setting).</li> ASCII text files will not use any user-defined functions (UDFs) you have created.</li></ul> </li></ul>