1. Tom McArdle
  2. PowerBuilder
  3. Wednesday, 3 July 2019 17:42 PM UTC

 

Hello 

 

Hopefully you can help me? I am trying to print to two different printers without having the 

user select each time.

 

I have been able to change the registry setting, but when I try and PRINT a datawindow PB

does not seem to use this?  If i do a PRINTSETUP I see the original default printer. It did not

change.

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]
"Device"="\\\\svr-dc1\\Downstairs Xerox WorkCentre 7556 PCL6,winspool,Ne10:"

 

dw_ir_label_2.print()

 

Any help would be appreciated

Tom

 

 

 

Christopher Craft Accepted Answer Pending Moderation
  1. Wednesday, 3 July 2019 18:24 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tom,

PB grabs the default printer the first time in. If you looked at the Windows default printer after setting the registry then it should be correct. PrintSetup() will display PB's default session printer. If you need both changed then you need to call SetPrinter() as well. That being said, why do you want to change the Windows default printer? That causes headaches when running in a Citrix envirnment.

Chris Craft

Comment
  1. Christopher Craft
  2. Wednesday, 3 July 2019 19:22 PM UTC
...Or setting the Printer Name in the DataWindow?
  1. Helpful
  1. Tom McArdle
  2. Wednesday, 3 July 2019 19:32 PM UTC
I will give that a shot.



Thank you
  1. Helpful
  1. Tom McArdle
  2. Wednesday, 3 July 2019 19:49 PM UTC
PrintsetPrinter worked beautifully .

That made my day



Thank you both

Happy 4th



  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.