Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cheesy solution of the week...or Stupid Programmer Tricks
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Cheesy solution of the week...or Stupid Programmer Tricks
Divers
Thread ID:
00104032
Message ID:
00104032
Vues:
75
One of the questions all of us have seen a number of times is, "How do I tell if the user printed the report from the preview window?" I figured out a way, but it's anything but elegant.

One of the things that disables a timer is printing a report. What I did was create a form with a timer. When the REPORT FORM (with NOWAIT) command was issued the timer's .Interval was set to 50 milliseconds. In tracking this (via SET DEBUGOUT TO and DEBUGOUT), I found that the interval jumped from an average of less than 60 milliseconds to over a full second when print button was clicked. BTW, this was with a report with only one record being printed. Well, I said it wasn't elegant...

Of course, there's absolutely no way to tell if the user hits the Cancel button. Anyone know if VFP 6.0 addresses these issues?
George

Ubi caritas et amor, deus ibi est
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform