Setting Page Margins

How to:

Reference:

You can set the page margins for your report. This includes the top, bottom, left, and right margins. You can also change the default unit of measurement (inches) to either centimeters or points. The unit of measurement applies to page margins, column width, and column position.


Top of page

x
Reference: Page Margin Attributes

Attribute

Description

Applies to

UNITS

Sets unit of measurement.

Used when specifying margin size or other page characteristics. If you change the current unit of measurement, the new value is applied to all instances in which unit of measurement is used.

PDF

PS

HTML report with internal cascading style sheet

TOPMARGIN
BOTTOMMARGIN
LEFTMARGIN
RIGHTMARGIN

Sets size of top, bottom, left, and right margin.

PDF

PS

HTML report with internal cascading style sheet



x
Syntax: How to Set the Unit of Measurement

This syntax applies to a PDF, PS, or HTML report with internal cascading style sheet.

In a StyleSheet, add the following attribute

UNITS = units

Outside of a report request, use

SET UNITS = units

Within a report request, use

ON TABLE SET UNITS units

where:

units

Is the unit of measure. Values can be:

  • INCHES, which specifies the unit of measure as inches. This is the default value.
  • CM, which specifies the unit of measure as centimeters.
  • PTS, which specifies the unit of measure as points. Points is a common measurement scale for typefaces.


Top of page

x
Syntax: How to Set Margin Size

This syntax applies to a PDF, PS, or HTML report with internal cascading style sheet.

[TYPE=REPORT,] [TOPMARGIN={value|.25},] [BOTTOMMARGIN={value|.25},]
 [LEFTMARGIN={value|.25},] [RIGHTMARGIN={value|.25},] $

where:

TYPE=REPORT

Applies the margin size to the entire report. Not required, as it is the default.

TOPMARGIN

Sets the top boundary of the report content.

BOTTOMMARGIN

Sets the bottom boundary of the report content.

LEFTMARGIN

Sets the left boundary of the report content.

RIGHTMARGIN

Sets the right boundary of the report content.

value

Is the size of the specified margin. The report content displays inside the margin. If printing a report, specify a value compatible with the printer's print area. For example, if the print area has 0.25 inch margins all around, set the margins to 0.25 inches, or larger.

The default value for all margins is 0.25 inches.



Example: Setting the Left Margin

This request sets the left margin of an HTML report with internal cascading style sheet to one inch.

SET HTMLCSS = ON 
TABLE FILE GGSALES
SUM CATEGORY PRODUCT DOLLARS BUDDOLLARS
BY REGION BY ST BY CITY
WHERE DOLLARS GT BUDDOLLARS
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $ 
LEFTMARGIN = 1, $ 
END

The output is:


WebFOCUS