Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the print button in a preview
Message
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00682100
Message ID:
00682133
Views:
15
>I preview a report in a defined window with this code:
>
>
THISFORM.r_nRecNo=RECNO("correct")
>
>DEFINE WINDOW wReport FROM 0,0 TO 100,200 TITLE;
> "Corrective Action Request" SYSTEM CLOSE
>
>ACTIVATE WINDOW wReport
>ZOOM WINDOW wReport MAX
>
>REPORT FORM qcf11 NOEJECT RECORD THISFORM.r_nRecNo;
> NOCONSOLE WINDOW wReport TO PRINT PROMPT PREVIEW IN SCREEN
>
>RELEASE WINDOW wReport
>
>I would like to run a second report containing "Instructions for Completion" only if the user chose to print from the print preview toolbar. Something along the lines of
>
>IF (printbutton is clicked)
>report form 1
>report form 2
>ELSE
>release window
>ENDIF
>
>
>How can I catch the print button?
>
>
>Thanks!

Here is a trick from Cathy Pountney:

Create a variable IsPrinted outside of your report
private IsPrinted
IsPrinted = .f.

In the report at the summary section on exit put:

_VFP.SetVar('IsPrinted',wexist('Printing...'))
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform