Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No way to tell if Print button was pressed on Preview?!
Message
From
01/08/1997 13:39:28
 
 
To
01/08/1997 11:48:42
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00042331
Message ID:
00042806
Views:
39
>Actually, if you look carefully at Valerie's idea, you'll find that it does work 100%
>of the time...
>
>The Title band is only executed ONCE at the beginning of a PRINT or the beginning
>of a PREVIEW
>
>If the user wants to PREVIEW, we set glPrinted=.T. .. If they just preview, the
>title band will run once, setting glPrinted to .F. If after they view the preview
>they click the Print button (which can only be done once), glPrinted is set back
>to .T. (You could also use something like gnPrinted = 0 and increment it in the
>title band and check the count.)
>
>If the user PRINTS, we set glPrinted to .F., and it is toggled once to .T. I haven't
>tested what printing more than one copy does, but I'm hoping it generated the form,
>then prints the multiple copies.
>
>So Valerie, you look like you're in the clear!


Actually Gino, no. If you look at the value of glPrinted in the debug window while paging backward (or forward and then back to page one) in the preview, you will see it change. I'm guessing that the Title Bar gets re-created every time you hit page one (which happens when going backwards as well as landing on page one). Right now I can't think of a way around it -- there's no way to control how much a user moves around in the preview and no way that I know of to find out by what method page one was reached (i.e. through paging or printing). So I guess we're back to removing the print button from the toolbar.

Valerie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform