Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing destination printer doesn't work
Message
From
21/09/1998 19:17:48
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00138166
Message ID:
00139309
Views:
24
>I had the same problem at one time. Try SET PRINTER TO DEFAULT *before* you save your report.
>
>HTH,
>
>--Paul
>
>>I'm trying to send a report to a printer different from the windows default printer. Nevertheless the report is always printed in the default printer.
>>
>>I've designed the report with "Printer 1" as the default. In the printers folder i've changed the default printer to "Printer 2". When i print the report always goes to "Printer 2".
>>
>>I've hacked the report frx and the fields "EXPR" ans "TAG" and "TAG2" have the code for the correct printer ("Printer 1").
>>
>>What am i doing wrong ? How can i make the report to go to "Printer 1" without using the "set printer to \\name..." command ?
>>
>>Thanks in advance....


FOrget the TAG2 business. I have a solution.
You don't mention which ver you need this for.

For FPW 2.6:-
You need to change the printer on the fly. The printer data is stored in win.ini. I have a routine that sets this up. It uses foxtools to call a few WIN API's. THis is the only way in FPW 2.6 to change printers on the fly.If you need this I can email you the file which you can then adapt for your own use FREE OF CHARGE.

For VFP5:-

Check out the following functions.VFP5 gets print data ALSO from the WIN.INI. Use APRINTERS() to get the printer names and use SET PRINTER TO NAME "Name of your printer as returned from APRINTER()"

That's it. While youre at it check the "SEE ALSO" for "PRINTERS" in the VFP Help.

Regards
BErnard
Previous
Reply
Map
View

Click here to load this message in the networking platform