Microsoft KB Archive/99547

{|
 * width="100%"|

-

The information in this article applies to:


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

-

SYMPTOMS
When you are printing very lengthy reports on non-Windows systems, the delay before printing begins can be quite long. However, when the same report is sent directly to the PRINT facility of MS-DOS, it will begin spooling immediately to the printer in the background.

CAUSE
The PRINT program has a resident portion that must be loaded into memory, which takes some time.

RESOLUTION
To avoid this delay, you can load the PRINT program before invoking FoxPro (consult your MS-DOS manual for other start-up options available for PRINT). This can be done by creating a batch file that first loads PRINT, and then loads FoxPro. The PRINT command expects confirmation of the default printer device the first time it is invoked. Since FoxPro should always use the default device PRN as its printer device, a file containing a single carriage return can be created and used with the MS-DOS input redirection character to automate the process. The output messages can also be redirected to the NUL device.

The following example assumes that you are using the MS-DOS 5.0 editor; if you aren't, make substitutions as needed.

 At the MS-DOS command prompt, type &quot;EDIT OK.PRN&quot; (without the quotation marks) and press ENTER. Press the ENTER key again, and then press ALT+F, X, and then ENTER to save the file.  At the MS-DOS command prompt, type &quot;EDIT FOXP.BAT&quot; (without the quotation marks). Type in the following information:       PRINT NUL CD\FOXPRO25 FOXPRO CD\ 

Press ALT+F, X, and then ENTER to save the file.

To begin a session of FoxPro with PRINT available, type &quot;FOXP&quot; (without the quotation marks) at the MS-DOS prompt and press ENTER. From within the FoxPro application program, the filename to be printed can be passed in a variable. For example, you can write a report to a file named BIGRPT.TXT, which you can then print as follows:   REPORT FORM megalist TO bigrpt   && .TXT default file extension. fyl=&quot;BIGRPT.TXT&quot; *-or could have been: *-  fyl=GETFILE(&quot;TXT&quot;,&quot;Select report to print&quot;) RUN PRINT &fyl NOTE: The resident portion of PRINT will reduce the amount of available conventional memory to FoxPro by approximately 40K. Therefore, running FoxPro with PRINT may not be optimal in every situation. Additional query words: FoxDos spooler

Keywords         : Version          : Platform         : Issue type       :
 * }