Solved

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

Posted on 2008-06-11
4
2,221 Views
Last Modified: 2013-12-20
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
Comment
Question by:rommel_natividad
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
diasroshan earned 300 total points
ID: 21766567
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
 

Assisted Solution

by:jane_harrison
jane_harrison earned 200 total points
ID: 21774793
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
 

Author Comment

by:rommel_natividad
ID: 21819148
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
 

Author Closing Comment

by:rommel_natividad
ID: 31466426
Thank you very much guys
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now