Using MS-DOS PRINT Spooler from Within FoxProID: Q99547
|
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.
The PRINT program has a resident portion that must be loaded into memory, which takes some time.
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.
PRINT <OK.PRN >NUL
CD\FOXPRO25
FOXPRO
CD\
REPORT FORM megalist TO bigrpt && .TXT default file extension.
fyl="BIGRPT.TXT"
*-----or could have been:
*----- fyl=GETFILE("TXT","Select report to print")
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 :
Last Reviewed: August 8, 1999