Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I detect print option from preview window
Message
From
04/07/2008 03:36:04
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01328556
Message ID:
01328949
Views:
10
>I call it after the call to the report as shown in my code snippet. If its is placed before the call to the report how will it detect that I have selected to print the report or not?

You need to place it inside the report and ask it after the report.

IOW:
Add a extra, outer, group to your report (one can use a summary but this fails with multicolum reports)
Group on .F. (this will make a single large group around your report)
In Group Footers on Exit expression place the _VFP.SetVar('llPrinted', SYS(2040)="2") code.

After the report you may query llPrinted

FYI:
Exit expression can not hold a statement, only expressions (hence the name), thats why we use _VFP.SetVar('llPrinted', SYS(2040)="2") instead of llPrinted = SYS(2040)="2". _VFP.SetVar() returns allways .NULL. so there is no harm to the report.

Update:
it is placed on group footer's on exit, because this is somthing that is printed on reports end. If the user cancels printig via ESC, the report will not be "printed"

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform