Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print button click detect
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01007858
Message ID:
01008032
Vues:
16
>Hi William,
>
>>Does any form to "detect" the user click the Print button in a report preview window.
>
>The easiest way is to set a variable in the exit expression for the summary band (the last thing to happen in a report). You can call a procedure containing:
>
>  If WExist("Printing...")
>    lPrinted = .T.
>  Endif
>
>The "Printing..." window only exists when VFP prints a report, not when during the preview. Be aware, though, that the window name is localized. The precise name depends on the VFP runtime language yoiu use in your application. Make sure, you only set the expression to .T. With someting like
>
>lPrinted = WExist("Printing...")
>
>the preview window would change the value back to .F. if the user first prints the report and then scrolls through entire preview.

It will not work in VFP7 and later with REPORT FORM ... NODIALOG in which case it's better to use SYS(2040) function.
_VFP.SetVar('lPrinted', SYS(2040)="2")
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform