Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET PRINTER TO NAME and REPORT FORM TO PRINTER
Message
De
29/10/1997 08:53:10
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00057169
Message ID:
00057179
Vues:
35
>I've a problem when I change the printer where I want to output the report, the report is always printed on the default printer.
>
>I've tried with this code :
>
>SET PRINTER TO NAME GETPRINTER()
>REPORT FORM myReport TO PRINTER
>
>My printers are on a Novel network or are device like Fax Driver
>
>It's a VFP 5.0 bug or I'm doing an error ?
>
>Thanks in advance,

I had this problem too. The .frx saves the default printer information and codes. This is one of the shortcomings for foxpro (IMO). In any case, here is a solution. This solution only works if the same printer drivers and codes are used. Generally, all HPLJ's are the same, so it should work in *most* offices.
USE myreport.frx
REPL expr WITH '', tag WITH '', tag2 WITH ''
<i> if the report is landscape, also do this:</i>
REPL expr WITH 'ORIENTATION = 1'
This removes the printer codes from the report and so output will be directed to the printer specified by SET PRINTER TO NAME MyDefaultPrinter.

The other, simpler alternative is to use REPO FORM myReport TO PRIN PROM NOCO. This will allow VFP to override the printer codes specified by the report.

I'll bet that there are other, more elegant solutions, but these are the easiest to implement.
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform