Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to know print job was completed successfully or not?
Message
 
 
À
31/05/2002 07:19:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00662621
Message ID:
00663336
Vues:
14
>Hello Nadya
>
>I wasn't feeling well so couldn't get back to you soon but thanks so much for your reply. yes i am using report writer to print check. If i want to update this lPrint field automatically through my program (instead of let user enter last sucessfully printed check number as Michael suggested) then one thing is sure that i have to print checks one by one. i guess that would be slow because every time it would initiate printer , sends request across network. but even with all this i still am confused how can i do this. you suggested that i should put that code in report summry onexit to update lprint. i guess this is how my code will look like.
>
private WasPrinted
>scan
 WasPrinted = .f.
>*--gather data
>report from printcheck.frm to printer
 if not WasPrinted
    =messagebox('Printing check was canceled by the user!';
     48,'Cancel Printing'
     && save recno() to proceeed from this
    exit &&
 endif
 endscan
>*--now check that variable to see if it was updated or not. but the problem is program won't wait upto this point. because as soon as above report from command is executed it will move to next command where i am checking variable status. and so i won't get correct variable status. is that right.? i thought thats what you were suggesting but please let me know if i have missed your point
>
>endscan
>
>thanks so much for your help again.
>
>Mark

You would set this variable in the onExit in Report summary. However, as I pointed out, it would not 100% guarantee, that the print job was really done (it would guarantee, that this print job was loaded into printer's memory). If you want to really be sure, the report was printed, you can either add a confirmation dialog from the user, or explore API functions... I believe, I saw some threads here on this subject...
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