Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer not ready
Message
 
 
À
29/08/2010 18:57:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01479131
Message ID:
01479137
Vues:
58
>>Hi everybody,
>>
>>Can a call to GetPrinter() function produce 'Printer not ready' error?
>>
>>Thanks in advance.
>
>http://www.ml-consult.co.uk/foxst-14.htm

Thanks. From that page:
What would happen if a user runs my application on a computer that has no printer driver installed?

One or more run-time errors will be generated whenever the application tries to perform a printer-related task. The errors will typically be "Printer not ready", "Error loading printer driver", or both. They will occur when the application tries to print a report, and also when you execute SET PRINTER, GETPRINTER() and several similar commands and functions. You can, however, successfully preview a report.

To prevent these run-time errors, test the value returned from APRINTERS() before performing a printer-related task. If this value is zero, it means that no printer drivers are installed.


I may add this check just in case. The strange thing is that the user reported an error in the previous version of the application and not in the new one and I'm sure the code is the same.

Is it possible to get this error when there are printers installed?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform