Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disable print to printer butter in REPORT Preview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00371699
Message ID:
00461296
Vues:
20
Hey, 7 months later, here's the answer!

Actually, I had to figure this same thing out today and didn't see my solution anywhere here on the thread, so I thought I'd post it.

Here's the trick, make the report preview call look like this:
REPORT FORM Foo NOCONSOLE PREVIEW WINDOW TO FILE NUL
Now, if they choose to print it with the little toolbar button, it gets piped to the NUL device.

I had to do this for a reason other than security. My users requested that I disable all printing if there are no network or local printers available. Well, that's easy to do for your PRINT button, just look at the return value from APRINTERS() and disable it if it is 0. I do let them preview though, I use the APRINTERS() = 0 to branch between a REPORT FORM call like I listed above and one with TO PRINTER PROMPT. That way the toolbar button is harmless.


Marty


>I want to disable "print to printer" butter in Preview Report screen.
>User can preview report only, CANNOT print out hard copy in "REPORT FORM cReportName PREVIEW"
Marty Smith, CSQE
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform