Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Terminal services printing issue
Message
 
To
17/04/2007 15:26:31
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01216955
Message ID:
01216990
Views:
13
>>>>>>Hi,
>>>>>>I have a printer on a Terminal services client installed in Windows Server 2003. I can print to it thru the regular Windows print command (File menu, then Print).
>>>>>>However, when I try to set the printer in Foxpro, using SET PRINTER TO NAME //Servername/printername, it hangs for a few seconds and then returns an error msg "Error accessing printer spooler".
>>>>>>FYI, I already set sharing permissions on the server's Windows/system32/spool directory, and I turned off all client firewalls (remember I can print when using the menu: File/Print command in any programs, including VFP). However, I need to code the printer selection without the user selecting.
>>>>>>
>>>>>>Can anyone help?
>>>>>>Thanks,
>>>>>>Allen
>>>>>
>>>>>If it prints correctly from VFP itself, then probably you have 'dirty' frx file. Make sure that Tag,Tag2 fields are empty, and Expr field doesn't have printer specific data.
>>>>
>>>>Hi Ed,
>>>>Good to hear from you again.
>>>>I'm not printing a report file. I am only trying the command SET PRINTER TO NAME ... in the command window. This will give an error. If I click the File menu, then Print in VFP or any other program, it works.
>>>>I think it's a setting for Terminal Services that I'm unsure of. I don't know if Terminal Services allows direct access to the print spooler.
>>>>Thanks,
>>>>Allen
>>>
>>>What if you try: SET PRINTER TO GETPRINTER()
>>
>>It works if I select the printer from getprinter().
>
>So, just issue ?GetPrinter() from command window, see what's returned and use it in your code.

I did that. Printed the results on screen, and it's exactly what I typed with the SET PRINTER TO NAME command. I also put the results into a variable, and macro substituted to the SET PRINTER command, and it's too errors.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform