How to: |
Reference: |
A StyleSheet enables you to specify an absolute or relative starting position for a column, heading, or footing, or element in a heading or footing. You can also add blank space around a report component.
This topic addresses column positioning using the StyleSheet attribute POSITION. For details on the column positioning command IN, see Positioning a Column.
For details on positioning a heading or footing, or an element in a heading or footing, see Using Headings, Footings, Titles, and Labels.
Attribute |
Description |
Applies to |
---|---|---|
POSITION |
Sets absolute or relative starting position of a column. An absolute position is the distance from the left margin of the printed paper. A relative position is the distance from the default position. After the first column, the default position is the end of the preceding column. |
PS |
TOPGAP BOTTOMGAP |
Adds blank space to the top or bottom of a report line. |
PS |
LEFTGAP RIGHTGAP |
Adds blank space to the left or right of a report column. |
PS |
This syntax applies to a PDF or PS report.
TYPE=REPORT, COLUMN=identifier, POSITION={+|-}position, $
where:
Selects a single column and collectively positions the column title, data, and totals if applicable. For valid values, see Identifying a Report Component in a WebFOCUS StyleSheet.
Starts the column at the specified distance to the right of the default starting position.
By default, text items and alphanumeric fields are left-justified in a column, and numeric fields are right-justified in a column.
Starts the column at the specified distance to the left of the default starting position.
It is possible to create a report in which columns overlap. If this occurs, simply adjust the values.
Is the desired distance, in the unit of measurement specified with the UNITS attribute.
The following illustrates how to position a column in a printed report. It is specified in the request that the PRODUCT_DESCRIPTION field display three inches from the left margin of the PDF report.
SET ONLINE-FMT = PDF TABLE FILE GGORDER "PRODUCTS ORDERED ON 08/01/96" SUM QUANTITY BY PRODUCT_DESCRIPTION WHERE ORDER_DATE EQ '080196' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, COLUMN=PRODUCT_DESCRIPTION, POSITION=3, $ ENDSTYLE END
The output is:
This request positions the column title and data for the QUANTITY field two inches from the default position, in this case, two inches from the end of the preceding column.
SET ONLINE-FMT = PDF TABLE FILE GGORDER "PRODUCTS ORDERED ON 08/01/96" SUM QUANTITY BY PRODUCT_DESCRIPTION WHERE ORDER_DATE EQ '080196' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, COLUMN=PRODUCT_DESCRIPTION, POSITION=3, $ TYPE=REPORT, COLUMN=QUANTITY, POSITION=+2, $ ENDSTYLE END
QUANTITY, titled Ordered Units in the report, is relatively positioned to Product:
This syntax applies to a PDF or PS report.
TYPE=REPORT, {TOPGAP|BOTTOMGAP}=gap, $ TYPE=type, [COLUMN=identifier,|ACROSSCOLUMN=acrosscolumn,] {LEFTGAP|RIGHTGAP}=gap, $
TYPE=type, [COLUMN=identifier,|ACROSSCOLUMN=acrosscolumn,] {LEFTGAP|RIGHTGAP}=gap, $
where:
Indicates how much space to add above the report line.
Indicates how much space to add below the report line.
Is the amount of blank space, in the unit of measurement specified with the UNITS attribute.
In the absence of grids or background color, the default value is 0. For RIGHTGAP, the default value is proportional to the size of the text font.
In the presence of grids or background color, the default value increases to provide space between the grid and the text or to extend the color beyond the text.
The gaps must be the same within a single column or row. That is, you cannot specify different left or right gaps for individual cells in the same column, or different top and bottom gaps for individual cells in the same row.
Identifies the report component. For valid values, see Identifying a Report Component in a WebFOCUS StyleSheet.
Selects one or more columns using the COLUMN attribute described in Identifying a Report Component in a WebFOCUS StyleSheet.
Selects the same column under every occurrence of an ACROSS sort field using the ACROSSCOLUMN attribute described in Identifying a Report Component in a WebFOCUS StyleSheet.
Indicates how much space to add to the left of a report column.
Indicates how much space to add to the right of a report column.
Note: For TOPGAP, BOTTOMGAP, LEFTGAP, and RIGHT GAP, you must specify a value of at least 0.013889 (the decimal size of a point in inches). If you specify a value less than this, WebFOCUS will round down to the nearest point, which is zero.
This request generates one-tenth of an inch of blank space above every data value in a PDF report.
SET ONLINE-FMT = PDF SET PAGE-NUM = OFF TABLE FILE GGORDER "PRODUCTS ORDERED ON 08/01/96" " " SUM QUANTITY BY PRODUCT_DESCRIPTION WHERE ORDER_DATE EQ '080196' ON TABLE SET STYLE * TYPE=DATA, TOPGAP = 0.1, $ ENDSTYLE END
The data is spaced for readability:
The following illustrates how to add blank space to the left of a report component. In this example, 1.5 inches of blank space are inserted to the left of the Product Category column.
SET ONLINE-FMT=PDF TABLE FILE CENTORD HEADING CENTER "Summary Report for Digital Products" " " SUM LINE_COGS/D12 AS 'Cost of Goods Sold' BY PRODTYPE AS 'Product Type' BY PRODCAT AS 'Product Category' WHERE PRODTYPE EQ 'Digital'; ON TABLE COLUMN-TOTAL/D12 ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLE * TYPE=REPORT, COLUMN=PRODCAT, LEFTGAP=1.5, $ ENDSTYLE END
The output is: