Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching printer to lpt2 or lpt1
Message
From
01/08/2001 12:43:14
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, United States
 
 
To
01/08/2001 07:37:46
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00537977
Message ID:
00538388
Views:
12
>>>Dear folks:
>>>
>>>I want to print one job in lpt1 and other job in lpt2. So I tried to use set printer to lpt1 and send printing job to printer, and set printer to lpt2 and send printing job to printer. But two jobs printed out to lpt1 printer.
>>>
>>>I used set printer to name XXX(lpt2) and send the data. but VFP change the printer to that name still does not print two job separately in two printer.
>>>It prints only one printer either lpt1 or lpt2.
>>>
>>>Is there any who can help me with this?
>>>
>>>Thank you in advance.
>>
>>If you are using a variable to hold the printer name you need to enclose the name in parentheses (). Your code should probably look like
>>SET PRINTER TO NAME (PrinterName). This works fine for me.
>
>Larry,
>
>PMFJI, but should the printer name in quotes ("PrinterName") or not (PrinterName)? Not questioning your advice, just asking as I have a similar problem right going on, but don't have the code in front of me. Thanks!
>
>Renoir

I can see where you might have been confused. As I was mentioned in my reponse I was intending that a variable contain the name of the printer (PrinterName = "\\SERVER01\PRINTER01"). That is how my code works. I put the printer name in a variable and then enclose the printer name variable in parentheses.

From what I can tell by my testing, it seems that SET PRINTER TO LPT2 doesn't do anything in VFP even if LPT2 is connected to a network printer. You need to use the form of SET PRINTER TO NAME (PrinterName) where PrinterName is a variable that contains the name of the printer as found in the Printers control panel and/or the APRINTERS() function.
Larry Huisingh
Lockheed Martin Information Technology
Richland WA USA
Previous
Reply
Map
View

Click here to load this message in the networking platform