Octavio-
Hi there. You need to set parameter number 4 to the value "2". This will print in landscape mode.
Here are the comments on what all of the parameters are and what they do:
<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
/****************************************************************************
File _osprint.p
Syntax
RUN adecomm/_osprint.p ( INPUT p_Window,
INPUT p_PrintFile,
INPUT p_FontNumber,
INPUT p_PrintFlags,
INPUT p_PageSize,
INPUT p_PageCount,
OUTPUT p_Printed ).
Purpose Send a specified operating system text file to the default
printer.
Remarks Output is sent to printer as PAGED output, with a default
page size of zero. This lets the printer handle the paging.
The page size can be specified using p_PageSize.
Max characters per line: 255.
Under MS-Windows, the MSW Print Setup dialog box
is called via a PROGRESS DLL (PROPRINT.DLL) and the
SESSION
RINTER-CONTROL-HANDLE is always cleared.
Author J. Palazzo
Created Mar 1994
Updated Sept 1996 Changed p_UseDialog parameter to p_PrintFlags.
****************************************************************************/
DEFINE INPUT PARAMETER p_Window AS WIDGET NO-UNDO.
/* Parent window for Dialogs and Message boxes. Default
to CURRENT-WINDOW if p_Window is not valid. */
DEFINE INPUT PARAMETER p_PrintFile AS CHAR NO-UNDO.
/* Text file to print. Can be specified relative to PROPATH. */
DEFINE INPUT PARAMETER p_FontNumber AS INTEGER NO-UNDO.
/* PROGRESS Font Number to use when printing file. MSW Only.
This may not match screen font exactly and the printer
driver will make the ultimate choice, not PROGRESS. */
DEFINE INPUT PARAMETER p_PrintFlags AS INTEGER NO-UNDO.
/* Integer expression that specifies various print options.
The table below lists the flag values that correspond to
each print option. If a zero (0) value is passed, option
defaults are used.
Print Option Flag Value Meaning
useDialog 1 Display the MSW Print Setup Dialog.
Default is to not display the Print
dialog.
useLandscape 2 Set print orientation to Landscape.
Default orientation is Portrait.
You can specify any combination of these flags. For
example, you can pass three (1 + 2) as an input parameter to
specify that the Print Setup Dialog be displayed and that
the print orientation be landscape. */
DEFINE INPUT PARAMETER p_PageSize AS INTEGER NO-UNDO.
/* Page length - number of lines per page. */
DEFINE INPUT PARAMETER p_PageCount AS INTEGER NO-UNDO.
/* If non-zero, then enable the page range selection controls
in the printer setup dialog. If zero, the entire text file
is printed. */
DEFINE OUTPUT PARAMETER p_Printed AS LOGICAL INIT TRUE NO-UNDO .
/* Returns TRUE if able to complete the OUTPUT TO PRINTER. */
[/code]
HTH.
-Chris
------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com