Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capturing Print click from Print Preview
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01250086
Message ID:
01250309
Views:
13
In VFP 9 SP2, there is a method in the ReportListener called OnPreviewClose(). It gets called when the preview window is closed and it receives a logical parameter of .t. if the user Printed.

Yes, Cathy, that's good advice for SP1, but incomplete for SP2:

In SP2, that method will not be called if the preview has been issued NOWAIT. In that case, you will need to monitor Listener.PrintCachedPages() (new reportlistener method in SP2, does exactly what you think.)

Basically, if NOWAIT, it's .PrintCachedPages(), otherwise, .OnPreviewClose().

It would have been nice to just say "it's always .PrintCachedPages()" but the RTM/SP1 ReportPreview API says you use .OnPreviewClose() and of course it is backward compatible in SP2.

That's how it goes.

- Colin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform