>Friends:
>
>If I process a REPORT FORM TO PRINTER PROMPT, is there any way I can tell whether the user abandoned the print job? I tried to set _PAGENO to 0 (Zero) with the thought of testing for the number of pages after the REPORT FROM statement but, VFP complained in the program that this was an illegal value.
>
>The same question holds true of PREVIEWing a report. Is there any way to tell whether the user just shut down the preview without printing the report?
>
>Any help would be appreciated.
I don't remember where I got this code but I'm copying it almost as is.
Put your processing code in a User Defined Function (or method) that you can call from within the report. In the "On Exit" section of the Report Summary Band, call your User Defined Function (or method). Your User Defined Function should look like this:
IF WEXIST('Printing...')
... Put your code here
ENDIF
The 'Printing...' window will only exist if the user has printed to the printer, not when the user is previewing. Putting the code in the "On Exit" section of the Report Summary band helps ensure that the user has finished printing and didn't cancel it.
*******************************************************
Save a tree, eat a beaver.
Denis Chassé