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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print landscape

Status
Not open for further replies.

anneoctaaf

Programmer
Dec 15, 2003
104
NL
The code below works..
How can i tell it to print it "landscape" (default is portrait)

Thanx in advance!

*******************************************************

long job
integer li_ret

job = PrintOpen( )

li_ret = PrintDataWindow(job, dw_bedrijven)
IF li_ret <> 1 THEN
messagebox('Afdruk fout!', 'Er ging iets mis met afdrukken, de lijst is niet afgedrukt')
END IF
PrintClose(job)

close(parent)
 
Do this before you call PrintDataWindow()

dw_bedrijven.Modify("DataWindow.Print.Margin.Orientation=1")


Orientation :
An integer indicating the print orientation. Values are:
0 -- The default orientation for your printer
1 -- Landscape
2 -- Portrait


 
... Or if you always print this in landscape, set the property in the DW painter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top