Friday, December 21, 2007

Tip of the Day #2: Changing Report Margins Using PRINT Command

Section: Enhanced PRINT Command
Supported Versions:
 . R:BASE 7.6 (Build 7.6.2.31221 or higher) for Windows
 . R:BASE (C/S:I) 7.6 (Build 7.6.2.31221 or higher) for Windows
 . R:BASE Turbo (Build 7.6.2.31221 or higher) for Windows

Did you know that you can change the report margins dynamically
using the enhanced PRINT ... OPTION margin parameters?

Here's how:

Four additional PRINT OPTIONs are now supported to change Left,
Top, Right and Bottom margins of report.

Syntax:

PRINT reportname OPTION outputvalue|MARGIN_xxxx nnn

Where:

outputvalue is the parameter such as SCREEN, PRINTER, BMP, EMF,
ETXT, GIF, HTML, JPG, PDF, RTF, TIFF, TXT, WMF, XHTML, or XLS.

MARGIN_xxxx are the parameter for:

. MARGIN_LEFT
. MARGIN_TOP
. MARGIN_RIGHT
. MARGIN_BOTTOM

nnn is the REAL data type value, such as, 0.5, 1.0 or 0.75

MARGIN_LEFT nnn option specifies the horizontal position on the
page where printing should begin. All report component positions
are relative to the margin. In other words, if the MARGIN_LEFT
parameter is set to 0.25 inches and you place a report component
in a band and set the component's "left" parameter to 0, then
that component will print 0.25 inches from the edge of page (or
at the left margin).

MARGIN_TOP nnn  option specifies the vertical position on the
page where printing should begin. All report component positions
are relative to the margin. In other words, if the MARGIN_TOP
parameter is set to 0.25 inches and you place a report component
in a band and set the component's "top" parameter to 0, then that
component will print 0.25 inches from the edge of page (or at the
top margin).

MARGIN_RIGHT nnn option specifies the horizontal position on the
page where printing should stop. All report component positions
are relative to the margin.

MARGIN_BOTTOM nnn option specifies the vertical position on the
page where printing should stop. All report component positions
are relative to the margin.

-- Example 01:
PRINT CustomerList OPTION PRINTER|MARGIN_LEFT 1.25

-- Example 02:
PRINT CustomerList OPTION PRINTER|MARGIN_TOP 0.50

-- Example 03:
PRINT CustomerList OPTION PRINTER|MARGIN_RIGHT 0.75

-- Example 04:
PRINT CustomerList OPTION PRINTER|MARGIN_BOTTOM 0.50

-- Example 05:
PRINT CustomerList OPTION PRINTER +
|MARGIN_LEFT 1.25 +
|MARGIN_TOP 0.50 +
|MARGIN_RIGHT 0.75 +
|MARGIN_BOTTOM 0.50

Very Best R:egards,

Razzak.


Reply via email to