Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with print orientation 1

Status
Not open for further replies.

eri232323

Programmer
Sep 22, 2005
21
HU
Hi,
I've got 2 dw and they are shared because the printing.
I set the orientation everywhere I can to landscape. (In main dw and in the shared dw in the designer, and from the script too before the printing), but it doesn't work, it always print in portre.
Has somebody an idea, how can I set this property to print well?
I use PB 10.0 build 4510...
 
I'm not sure, but might it be that you have to check your printer itself (meaning the fisical device)?

check out the menu functions on the printer and see if there's something that makes it print always the same way.

First try if you can print as desired from ie notepad.exe ....

regards,
Miguel L.
 
there is no problem with my printer, my printer is good. ;)
if I set orientation at the printer property it's printing good. otherside i use my notebook different places and with different printers, and it works same, so it's independent from printer.
I would like set this from application (from designer or script it isn't impotant), because my users need set this property everytime when they printing this doc.
 
very funny. did you try to call printsetup() instead of using a direct print() ? (I'm not sure of the name of the function, it's printsetup() or setpring() or alike. check for print functions). Then see if it prints portrait even though you change the print properties.

regards,
Miguel L.
 
I cal this:

dw_print.modify ( 'datawindow.print.preview=yes' )
job = printopen( list_name, true )
printdatawindow( job, dw_print )
printclose( job )

and at the design area I set the orientation too...
 
okay your problem is clear now:

You are using a printjob instead of the (more usual) dw_print.print() function (without opening a job).

Check out the help file 'printdatawindow':
-----------------------------------------
When you use PrintDataWindow with PrintOpen and PrintClose, you can print several DataWindows in one print job. The information in each DataWindow control starts printing on a new page.
When you print a DataWindow using PrintDataWindow, PowerBuilder uses the fonts and layout specified in the computer's printer setup, not the fonts and layout specified in the DataWindow. The PrintDefineFont and PrintSetFont methods also have no effect.

so you're layout of landscape in the datawindow has no effect. It'll use whatever is defined as default in the printersetup in windows.

If you can, simply use dw_print.print() that'll do the trick.

regards,
Miguel L.
 
Wow! Miguel! You are a real professional! Thank you wery much! I give you a star ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top