[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2518
  • Last Modified:

POWERBUILDER PRINTING - Is it possible to print to another printer without changing the default printer in printer manager?

Is it possible to print to another printer without changing the default printer in printer manager? I am using Powerbuilder. or I need to call the PRINTER MANAGER? How do I achieve that? Below is the script I am using to print but it only prints into the default printer.

      tabpage.tabpage_frame.dw_poRRDTLt2.print()
      messagebox('Finished','Press any key to continue')

Thank you very much.


0
rommel_natividad
Asked:
rommel_natividad
  • 2
2 Solutions
 
diasroshanCommented:
Hi,

Look onto PB Help for PrintSetPrinter function and other related functions.

This example sets the printer to the first printer in the list retrieved by the PrintGetPrinters function:
long ll_place
string ls_setprn
string ls_prntrs = PrintGetPrinters ( )
ll_place=pos (ls_prntrs, "~n")
mle_1.text = PrintGetPrinters ( )
ls_setprn = Left (ls_prntrs, ll_place - 1)
PrintSetPrinter (ls_setprn)

Cheers,
Rosh
0
 
jane_harrisonCommented:
Hi,

look up the print() method in PB help and you should see that there are 2 optional arguments to the print() method, one of which gives you the option to display the print dialog box.

integer dwcontrol.Print ( { boolean canceldialog {, showprintdialog } } )

The print dilog box gives you the option to change the printer you want to print to

hope that helps
Jane
0
 
rommel_natividadAuthor Commented:
Hi,

I am here at the Pacific Rim and sad to say I am still stucked with PB ver. 5.0 and 6.0, the methods are not available on the said version. Is there any other work around?

Thanks.

Rommel
0
 
rommel_natividadAuthor Commented:
Thank you very much guys
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now