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,357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Printers have changed substantially in the last 30 or so years, not just in technical capabilities but in cost and usage as well.  Printers were originally used for interfacing with the operator, not necessarily for printing copy or pictures. In …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 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