Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reports don't print until program ends
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00631810
Message ID:
00631907
Vues:
20
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform