Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cheesy solution of the week...or Stupid Programmer Tricks
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Cheesy solution of the week...or Stupid Programmer Tricks
Miscellaneous
Thread ID:
00104032
Message ID:
00104032
Views:
73
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
Next
Reply
Map
View

Click here to load this message in the networking platform