Identifying an Entire Report, Column, or Row

How to:

You can apply formatting to an:

The following illustrates where the REPORT component and the COLUMN and ACROSSCOLUMN attributes appear in a report, and which TYPE values you use to identify them. Although in this example the value for COLUMN is B1 and the value for ACROSSCOLUMN is N2, these are not the only values you can use to identify these components.

TABLE FILE CENTORD
SUM LINEPRICE LINE_COGS AS 'Line Cost of,Goods Sold'
BY PLANT AS 'Plant'
ACROSS YEAR
WHERE YEAR EQ 2000 or 2001
HEADING
"Cost Analysis"
FOOTING CENTER
"**End of Report**"
ON TABLE SET PAGE-NUM OFF
END

Note: Since this request simply illustrates where the components appear in a report, it omits a StyleSheet.

Syntax: How to Identify an Entire Report

To identify an entire report in a StyleSheet, use this attribute and value:

TYPE=REPORT

Example: Identifying an Entire Report

The following illustrates how to identify and apply formatting to an entire report. The relevant StyleSheet declarations are highlighted in the request.

TABLE FILE CENTINV
HEADING
"Excess Stock Report"
SUM QTY_IN_STOCK  
BY PRODNAME
WHERE QTY_IN_STOCK GT 10000
FOOTING CENTER
"**End of Report**"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE * 
TYPE=REPORT, GRID=OFF,$
TYPE=REPORT, STYLE=BOLD,$ 
ENDSTYLE
END

The output is:

Syntax: How to Identify an Entire Column

TYPE=REPORT, coltype=column

where:

coltype

Specifies the type of column. It can be:

  • COLUMN, which specifies a sort column (generated by BY), a display column (generated by PRINT, LIST, SUM, or COUNT), a computed column (generated by COMPUTE), or a column of row totals (generated by ROW-TOTAL).
  • ACROSSCOLUMN, which specifies every instance of a column that is repeated across a horizontal sort (ACROSS) row. This also applies the formatting to the horizontal sort (ACROSS) values that appear above the column titles.
column

Specifies one or more columns. If you are identifying an ACROSSCOLUMN, the only valid identifiers are Nn and Pn, and these only count ACROSS fields, not display fields.

Options for identifying columns in a StyleSheet are:

Identifier

Description

Nn

Identifies a column by its position in the report. To determine this value, count vertical sort (BY) fields, display fields, and ROW-TOTAL fields, from left to right, including NOPRINT fields. For ACROSSCOLUMN, only ACROSS fields are counted.

Pn

Identifies a column by its position in the report. To determine the value of n, count vertical sort (BY) fields, display fields, and ROW-TOTAL fields from left to right. Do not count NOPRINT fields. For ACROSSCOLUMN, only ACROSS fields are counted.

Cn

Identifies a display column by its position in the report. To determine the value of n, count only display fields from left to right, including NOPRINT fields. Do not count vertical sort (BY) fields or ROW-TOTAL fields.

To select all display fields use C*.

Bn

Identifies a vertical sort (BY) column by its position in the report. To determine the value of n, count only vertical sort (BY) fields, including NOPRINTs, from left to right.

To select all BY fields use B*.

field

Identifies a column by its field name.

When a field occurs more than once, use field(n) to select a particular occurrence or field(*) to select all occurrences of the field.

ROWTOTAL

Identifies a column of row totals generated using ROW-TOTAL. When used with ACROSS and multiple display commands, ROWTOTAL generates multiple total columns. Use ROWTOTAL(n) to select a particular total column. Use ROWTOTAL(field) to select the row total column for a particular field.

Use ROWTOTAL(*) to select all row total columns in the report.

Note: Within a StyleSheet, all columns must be specified in the same way, either by field name or positional reference.

Example: Identifying an Entire Column

The following illustrates how to identify an entire column, which consists of the column data and the column title, in a report. The relevant StyleSheet declaration is highlighted in the request.

Note: To produce the same results you can, alternatively, use the values P1, B1, or the fieldname (PRODNAME) for the COLUMN attribute in the StyleSheet declaration.

TABLE FILE CENTINV
HEADING
"Excess Stock Report"
SUM QTY_IN_STOCK  
BY PRODNAME
WHERE QTY_IN_STOCK GT 10000
FOOTING CENTER
"**End of Report**"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$ 
TYPE=REPORT, COLUMN=N1, STYLE=ITALIC,$ 
ENDSTYLE
END

The output is:

Example: Identifying an Entire Horizontal (ACROSS) Column

The following illustrates how to identify a horizontal (ACROSS) column. When you identify and format an ACROSSCOLUMN, all data values, the column title, and any horizontal sort (ACROSS) values associated with the field are formatted for every instance of the column in the report output. The relevant StyleSheet declarations are highlighted in the request.

Note: To produce the same results you can alternatively use the values P1 and P2, respectively, for the ACROSSCOLUMN attribute.

TABLE FILE CENTORD
SUM LINEPRICE LINE_COGS AS 'Line Cost of,Goods Sold'
BY PLANT AS 'Plant'
ACROSS YEAR
WHERE YEAR EQ 2000 OR 2001
HEADING
"Cost Analysis"
FOOTING CENTER
"**End of Report**"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$ 
TYPE=REPORT, ACROSSCOLUMN=N1, STYLE=ITALIC,$
TYPE=REPORT, ACROSSCOLUMN=N2, STYLE=BOLD,$  
ENDSTYLE
END

The output is:

Syntax: How to Identify an Entire Financial Modeling Language (FML) Row

TYPE=REPORT, LABEL=label					

where:

label

Is an explicit row label.

Example: Identifying an Entire FML Row

The following illustrates how to identify an entire FML row, consisting of the row label and the row data. The relevant StyleSheet declarations are highlighted in the request.

TABLE FILE LEDGER
SUM AMOUNT FOR ACCOUNT
1010 AS 'CASH ON HAND' LABEL COH OVER
1020 AS 'DEMAND DEPOSITS' LABEL DD OVER
1030 AS 'TIME DEPOSITS' LABEL TD OVER
BAR OVER
RECAP TOTCASH = R1 + R2 + R3; AS 'TOTAL CASH' 
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $ 
TYPE=REPORT, LABEL=COH, STYLE=ITALIC, $
TYPE=REPORT, LABEL=DD, STYLE=ITALIC, $
TYPE=REPORT, LABEL=TD, STYLE=ITALIC, $ 
ENDSTYLE
END

The output is:

Syntax: How to Identify an Entire Total or Subtotal Row

TYPE=type, [BY=sortcolumn]

where:

type

Identifies a subtotal or total. Select from:

GRANDTOTAL which is a grand total (generated by COLUMN-TOTAL, SUBTOTAL, SUB-TOTAL, RECOMPUTE, or SUMMARIZE).

SUBTOTAL which is a subtotal (generated by SUBTOTAL, SUB-TOTAL, RECOMPUTE, or SUMMARIZE).

RECAP which is a subtotal calculation (generated by ON sortfield RECAP or ON sortfield COMPUTE).

BY

When there are several subtotal commands, each associated with a different vertical sort (BY) column, this enables you to identify which of the subtotal commands you wish to format.

sortcolumn

Specifies the vertical sort (BY) column associated with one of the several subtotal in the report commands. Use the field name to identify the sort column.

Example: Identifying an Entire Total Row

The following illustrates how to identify an entire COLUMN-TOTAL row in a StyleSheet. The relevant StyleSheet declaration is highlighted in the request.

TABLE FILE SALES
SUM RETURNS DAMAGED AND ROW-TOTAL AND COLUMN-TOTAL
BY PROD_CODE
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $  
TYPE=GRANDTOTAL, STYLE=BOLD, SIZE=12, $ 
ENDSTYLE
END

The output is:

Example: Identifying a Row Total

The following illustrates how to identify a row total. The relevant StyleSheet declaration is highlighted in the request. Note that if you want to format an instance of row-total, you can add a WHEN statement to your StyleSheet. For details, see Controlling Report Formatting.

TABLE FILE SALES
SUM RETURNS DAMAGED AND ROW-TOTAL
BY PROD_CODE AS 'PRODUCT,CODE'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $ 
TYPE=REPORT, COLUMN=ROWTOTAL, STYLE=BOLD, $ 
ENDSTYLE
END

The output is: