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,193 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
If you use a Brother DCP 130C or similar Brother printer, at some point you might encounter the following problem: after you change the ink cartridge, the printer displays an "ink empty" message. Sometimes you just need to follow the instructions…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

760 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

20 Experts available now in Live!

Get 1:1 Help Now