>A friend of mine (not really myself) is trying to print several reports. He queues them all up but nothing prints until he ends the program. How do you force the prints to execute without having to exit the program? This is in FoxPro 2.6 for DOS on Windows 98 machines.
This is caused by the Windows spooler not releasing the printed output until the current print context is closed - if no printer switching occurs, the spooler remains active until the job terminates. Adding the following code after the end of the print job will cause the spooler to close by forcing a write to a null context:
SET PRINTER TO NUL:
EJECT
SET PRINTER TO
this actually forces a new printer context to be created, guarenteeing that the previous spool job is closed.