Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know print job was completed successfully or not?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00662621
Message ID:
00663034
Views:
24
>Nadya, you advised Mark:
>
>>How do you print it? Is it VFP report? If yes, you can do the following trick: put in the summary OnExit:
>>
>>_VFP.SetVar('PrintCompleted',wexist('Printing'))
>>
>>So, if your report would be printed till this point, this variable PrintCompleted would be set to true. You have to set it to .f. before each report invocation. Also make this variable private.

>
>That would set one logical memory variable named PrintCompleted to .T.. I presume that you would then REPLACE a field in the table with based on the value in PrintCompleted.
>
>Can this be done in the OnExit of the detail band to mark each record of a table as having been printed when a selected subset of the table is included in the report?
>
>Thanks,

Hi Randy,

Yes, it's a neat extension of the idea. Instead of _VFP.SetVar you can call a function. This function would replace field in the table. This idea needs some experimenting, of course. I didn't try the idea, I suggested to Mark, but it should work.

I use similar, but more complicated idea, in order to insert blank page, if group ends on the odd page. Cathy Pountney described it in the FoxTalk article of February 2001. I believe all these nifty tricks could be found in her new book.

BTW, I just realized, this this trick is still not 100% sufficient. The printing message appears, when printer loads job in memory. If this window existed at the Summary, it means, that the report was not interrupted by user. However, it's still no guarantee, that it was printed (there could be printer's problems).
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform