Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capturing Print click from Print Preview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01250086
Message ID:
01250309
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform