Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directing output to printer using @...Say
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00212617
Message ID:
00212622
Vues:
21
>I have an old dbase report that I want to reuse instead of using an .frx. This report prints to a pre-formatted form on a dot-matrix. I've been fighting with the .frx version for weeks and decided it's time to get out the old dbase code.
>
>My question is, how do you redirect output to the printer in VFP? I'm using SET PRINT ON and SET DEVICE TO PRINT and then issue my @...SAY commands. Nothing happens but when I issue SET PRINTER TO DEFAULT the output that has apparently been queued up suddenly dumps to the printer. FYI, I'm using a generic/text only printer driver with an Okidata ML320 if that helps.

You sort of answered your own question here.

SET PRINT ON redirects @...SAY to the printer. (SET DEVICE TO PRINT redirects ? commands to the printer. Or did I get them backwards?)

SET PRINTER TO [anything] flushes the printer buffer. FoxPro buffers direct output to the printer until you change printers (or pretend to).

HTH,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform