Using usage codes

Usage codes provide summary information about the data in a column.

For example, usage codes can provide total summary information at the end of a column, or partial summaries at control breaks in a table. The usage codes available depend on the data in the column and the type of summary.

Usage Code Description Notes
ACROSS Enables you to produce a report with horizontal control breaks. In an ACROSS report:
  • The number and titles of the columns in the report are dependent on the values in the ACROSS column. There is one set of report columns for each value in the ACROSS column and the header for each is the value of column. The set of report columns includes a column for each one that uses an aggregation usage code (for example, SUM, AVERAGE, COUNT).
  • You can only have one ACROSS column in a report.
  • The number of rows and the title of each row in the report are dependent on the values in the GROUP column(s). There is one row for each value in the GROUP column(s) and the title of each row is the value of the column(s).
  • The CSUM, PCT, CPCT, TPCT and TCPCT usage codes are only partially supported when generating reports that also use the ACROSS usage code.
AVERAGE Average of the values in the column This usage code is only valid for numeric data This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
Breakn Provide a control break level (where "n" represents a number between 1 and 6). For example, BREAK1 specifies a control column for a level-1 break and BREAK2 specifies a control column for a level-2 break. Any change in the value of the column causes a section break in the report. Subtotals are displayed for columns whose usage is one of the aggregation usages. Also, the text specified the appropriate Form Break component is displayed. Your query should use an ORDER BY clause that matches your BREAK columns.
BREAKnX Same as BREAKn, except the control column is omitted from the report. Same as BREAKn.
CALCid The evaluation of the calculation expression in the Form calculations component where ID equals "id". This calculated value appears as a total in the report and applies only to the last row of data. The calculated value is formatted with the edit code of the column. If the column value is used in the calculation, only the last row of data is evaluated.
COUNT Count of the non-null values in the column. This calculated value appears as a total in the report. The calculated value is formatted with the edit code K.
CPCT Cumulative percentage each value of the column is of the current total.
  • This calculated value replaces each detail line value and also appears as a total in the report.
  • The calculated value is formatted with the edit code of the column.
  • The CPCT usage code is only partially supported when generating reports that also use the ACROSS usage code.
CSUM Cumulative sum of the values in the column.
  • This calculated value replaces each detail line value and also appears as a total in the report.
  • The calculated value is formatted with the edit code of the column.
  • The CSUM usage code is only partially supported when generating reports that also use the ACROSS usage code.
FIRST First value of the column. This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
GROUP Displays only one line of summary data for each set of values in the column. More than one column can have usage code GROUP. If so, a change in value in any column starts a new group. All other columns with no usage code are omitted from the report.
LAST Last value in the column. This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
MAXIMUM Maximum value in the column. This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
MINIMUM Minimum value in the column. This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
OMIT Excludes the column from the report. The column and its values are not included in the tabular report. The values in the column can still appear in the report (for example, in a break footer) by use of form variables (such as &n, where n represents the column number).
PCT Percentage each value of the column is of the current total.
  • This calculated value replaces each detail line value and also appears as a total in the report.
  • The calculated value is formatted with the edit code of the column.
  • The PCT usage code is only partially supported when generating reports that also use the ACROSS usage code.
STDEV Standard deviation of the values in the column. This usage code is only valid for numeric data. This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
SUM Sum of the values in the column. This usage code is only valid for numeric data. This calculated value appears as a total in the report. The calculated value is formatted with the edit code of the column.
TPCT Percentage each value of the column is of the final total.
  • This calculated value replaces each detail line value and also appears as a total in the report.
  • The calculated value is formatted with the edit code of the column.
  • The TPCT usage code is only partially supported when generating reports that also use the ACROSS usage code.
TCPCT Cumulative percentage each value of the column is of the final total.
  • This calculated value replaces each detail line value and also appears as a total in the report.
  • The calculated value is formatted with the edit code of the column.
  • The TCPCT usage code is only partially supported when generating reports that also use the ACROSS usage code.