Use FORM.COLUMNS to make choices about the uses of the columns. What you specify on FORM.COLUMNS is reflected on FORM.MAIN. Conversely, what you specify on FORM.MAIN (areas A through F ) is reflected on FORM.COLUMNS.
FORM.COLUMNS COLUMNS: Total Width of Report Columns: 66 A B C D E F NUM COLUMN HEADING USAGE INDENT WIDTH EDIT SEQ --- ------------------------------ ------ ----- ----- ----- --- 1 ID 2 6 L 1 2 NAME 2 9 C 2 3 DEPT 2 6 L 3 4 JOB 2 5 C 4 5 YEARS 2 6 L 5 6 SALARY 2 10 L2 6 7 COMM 2 10 L2 7 8 Total Earnings 2 12 L2 8 *** END *** 1=Help 2=Check 3=End 4=Show 5=Chart 6=Query 7=Backward 8=Forward 9=Specify 10=Insert 11=Delete 12=Report OK, FORM.COLUMNS is displayed. COMMAND ===> SCROLL ===> PAGE
If your installation supports DBCS data, see Names with double-byte characters.
You can enter any new heading of up to 40 characters over a heading shown in the COLUMN HEADING area. The heading, like the original column name, can contain blanks or special characters; of these, the underscore character (_) is reserved for multiple-line headings.
To create multiple-line
headings, use an underscore in a column heading to specify a break between
lines. For example:
EMPLOYEE_NAME displays as: EMPLOYEE NAME
A single underscore before or
after an entire column heading has no effect. For example, _EMPLOYEE
NAME does not add a blank line. However, consecutive underscores within
text produce one or more blank lines in a column title. You can have up to
nine lines in a column heading.
For example, these two column names:
1 ONE_TWO_THREE_FOUR_FIVE_SIX_SEVEN 2 SIX_ _LINE_ _ _TITLE
Display as:
ONE SIX TWO THREE LINE FOUR FIVE SIX TITLE SEVEN
If you are using double-byte characters in column headings, you can specify a break between lines if the underscore you use is a single-byte character.
To create column headings in uppercase and lowercase, specify in your PROFILE a CASE value of either STRING or MIXED.
Headings are aligned (justified) to the left over a column of character data, and to the right over a column of numeric data. If there is more than one line in the heading, the longest line is justified, and shorter lines are centered within the longest line. You can override these defaults by entering a new alignment value. See Column alignment for more information.
If any line of a heading is longer than the width of the column, it fills the whole width of the column and is cut off on the right.
Global variable substitution is not performed for column headings.
Charts: Most of the preceding information on how changes to COLUMN HEADING affect reports is also true for charts. Column headings for data plotted on the Y-axis appear in the legend of a chart. Therefore, you probably want these column headings to be as concise as possible, or the legend will take up too much space on the chart.
Aggregation | Usage Code | Minimum Abbreviation | Page |
---|---|---|---|
Across | ACROSS | AC | ACROSS Usage Code |
Average | AVERAGE (or AVG) | AV | Summarize Data in a Column |
Break1 | BREAK, BREAK1 | B, B1 | FORM.BREAKn |
Break1x | BREAKX, BREAK1X | BX, B1X | FORM.BREAKn |
Break2 | BREAK2 | B2 | FORM.BREAKn |
Break2x | BREAK2X | B2X | FORM.BREAKn |
Break3 | BREAK3 | B3 | FORM.BREAKn |
Break3x | BREAK3X | B3X | FORM.BREAKn |
Break4 | BREAK4 | B4 | FORM.BREAKn |
Break4x | BREAK4X | B4X | FORM.BREAKn |
Break5 | BREAK5 | B5 | FORM.BREAKn |
Break5x | BREAK5X | B5X | FORM.BREAKn |
Break6 | BREAK6 | B6 | FORM.BREAKn |
Break6x | BREAK6X | B6X | FORM.BREAKn |
Calculate | CALCid | CA | FORM.CALC |
Count | COUNT | CO | Summarize Data in a Column |
Cumulative percent | CPCT | CP | Replace Data Value with a Calculation |
Cumulative sum | CSUM | CS | Replace Data Value with a Calculation |
First | FIRST | F | Summarize Data in a Column |
Group | GROUP | G | GROUP Usage Code |
Last | LAST | L | Summarize Data in a Column |
Maximum | MAXIMUM | MA | Summarize Data in a Column |
Minimum | MINIMUM | MI | Summarize Data in a Column |
Omit | OMIT | O | OMIT Usage Code |
Percent | PCT | P | Replace Data Value with a Calculation |
Standard deviation | STDEV | ST | Summarize Data in a Column |
Sum | SUM | SU | Summarize Data in a Column |
Total cumulative percent | TCPCT | TC | Replace Data Value with a Calculation |
Total percent | TPCT | TP | Replace Data Value with a Calculation |
INDENT is always specified in single-byte characters.
If the column you are displaying uses a graphic edit code, the width can be any number from 1 through 16,383. For more information about how to calculate the width of a column containing DBCS data, see the Using QMF manual.
For a column that uses a graphic edit code, the width of the column, when displayed or printed, is twice the column width, plus one character space.
When assigning a width for numeric data, include space for the following characters as well as for digits:
If the length of a value to be displayed exceeds the width of the column:
In some cases, you can avoid a numeric overflow by using a different data type. For example, in an arithmetic operation, if all operands are decimal numbers and an overflow occurs, you can change at least one operand to a floating point number. In this example, the operand can be a floating point constant or a floating point table column.
Resolve column width problems by changing WIDTH and displaying the report again. Alternatively, you can tell QMF to keep the column width the same, but to wrap data that will not fit on a line to the next line in the column. Column wrapping applies only to nonnumeric data. For more information about column wrapping, see Edit Codes.
The width of a column on the default form is at least as great as the longest line in the column heading. Otherwise, the assigned width depends on the data type of the column, as shown in Table 10.
Data Type | Width on Default Form |
---|---|
SMALLINT | 6 |
INTEGER | 11 |
DECIMAL | The width of the column in the database, plus 3 character spaces. |
FLOAT | 10 |
CHAR | The width of the column in the database. |
VARCHAR | The maximum width of the column in the database. |
LONG VARCHAR | The smaller of:
|
GRAPHIC | The width of the column in the database. |
VARGRAPHIC | The width of the column in the database. |
LONG VARGRAPHIC | The smaller of:
|
DATE | 10, or if your date format is
locally defined by your installation, the larger of:
|
TIME | 8, or if your time format is
locally defined by your installation, the larger of:
|
TIMESTAMP | 26 |
When inserting a line on FORM.COLUMNS, the default width is 10.
For single-precision floating point data, values with a data type of FLOAT are treated the same for single-precision or double-precision.
Charts: Specify the number of character positions for labels on the X-axis of a chart.
If the width exceeds the allotted space, the labels might be omitted. Truncating the width of column headings is one way to handle the problem of omitted labels. When labels are truncated, more fit in the allotted space.
Single-precision floating point data is treated the same as double-precision floating point data for chart formatting.
Values from columns with DATE, TIME, and TIMESTAMP data types, (treated as character strings) cannot appear on the Y-axis.
Charts: The X-axis labels come from columns using GROUP or BREAK (or from the leftmost column of the report when there is no GROUP or BREAK). The effect that edit codes have on the data in those columns appears in the X-axis labels. For example, if data selected for the X-axis is column wrapped, only the first line is incorporated into the labels.
Also, numeric columns that are edited with Uxxxx or Vxxxx cannot be used for Y data.
Finally, when column substitution values (amp;n) are used in the page heading (and therefore, in the chart heading), they are edited according to the edit code for that column in the form.
Table 11 lists the edit codes that can be specified for each data type and the page that contains more information.
Data Type | Edit Codes | Page |
---|---|---|
Character | C CDx CW CT X B XW BW Uxxxx Vxxxx |
Edit Codes for Character Data |
Graphic | G Uxxxx GW Vxxxx |
Edit Codes for Graphic Data |
Numeric | E<Z> D<Z><C> I<Z> J<Z> K<Z> L<Z> P<Z> Uxxxx Vxxxx |
Edit Codes for Numeric Data |
DATE | TDYx C TDMx CW TDDx CT TDYAx CDx TDMAx Uxxxx TDDAx Vxxxx TDL |
Edit Codes for Date Data |
TIME | TTSx C TTCx CW TTAx CT TTAN CDx TTUx Uxxxx TTL Vxxxx |
Edit Codes for Time Data |
TIMESTAMP | TSI CDx C Uxxxx CW Vxxxx CT |
Edit Codes for Timestamp Data |
You can use character edit codes with DATE, TIME, and TIMESTAMP columns to allow wrapping of those columns.
When variables are resolved, the column number is taken from NUM, not SEQ.
SEQ numbers are ignored in ACROSS reports.