Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the name of the default printer?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00235120
Message ID:
00240141
Views:
26
>George,
>
> Hi! I'm using the US ST. Fanfold Paper size and the two Epson Printer have different constant for this paper size. Epson LQ1170 is size 39 while Epson LQ2170 is size 286. I see this on the expr field of my reports. so I use the set('PRINTER',2) function like this:
>cDefPrinter = SET('PRINTER',2)
>IF cDefPrinter = "Epson LQ-1170 ESC/P 2"
> ....
> RUN MY REPORT (SETUPED IN LQ-1170/US ST. FANFOLD PAPER SIZE IN THE
> REPORT DESIGNER)
>ELSE
> RUN MY REPORT (SETUPED IN LQ-2170/US ST. FANFOLD PAPER SIEZ IN THE
> REPORT DESIGNER)
>ENDIF
>
>This is working but if the user changed the name of the LQ1170 printer in Windows 95 (Start/Properties/Printers), my first condition will fail. What I want is how to get the printer name / type directly from the printer / registry not just the printer name from Windows 95 (SET('PRINTER',2)).
>
>Thanks again.
>
Hi Charlotte

Unless I'm mistaken here, I think what you need to do is use the SET PRINTER command to set the appropriate printer. You can get an array of the printer names with the APRINTERS() function. You might also have to clear the printer settings in the FRX, but before doing that, I'd check the results of using SET PRINTER.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform