In this section: |
How to: |
Reference: |
A column title identifies the data in a report. Use the AS phrase to change the default column title for customized data identification or more desirable formatting. You can change a column title:
A column title defaults to the field name in the Master File. For a calculated value (one created with COMPUTE), the title defaults to the field name in the request.
Consider this request:
TABLE FILE EMPDATA SUM SALARY BY DEPT BY LASTNAME WHERE DEPT IS 'SALES' OR 'CONSULTING' OR 'ACCOUNTING' ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The report output illustrates these default column titles:
The output is:
fieldname AS 'title_line_1 [,title_line_2,...]'
where:
To specify a multiple-line column title, separate each line with a comma.
To customize a column title for a calculated value, use the syntax:
COMPUTE fieldname[/format] = expression AS 'title'
For related information, see Creating Temporary Fields.
Tip:
PRINT LAST_NAME AS ''
This request customizes the column titles for the field named in the SUM command (SALARY), and the fields named in the BY phrases (DIV and DEPT).
TABLE FILE EMPDATA SUM SALARY AS 'Total,Salary' BY DIV AS 'Division' BY DEPT AS 'Department' WHERE DIV EQ 'NE' OR 'SE' OR 'CORP' HEADING "Current Salary Report" ON TABLE SET STYLE * TYPE=REPORT,GRID=OFF,$ ENDSTYLE END
The output is:
This request suppresses the column title for LAST_NAME. It also illustrates a multiple-line column title (EMPLOYEE NUMBER) for the data for EMP_ID.
TABLE FILE EMPLOYEE PRINT FIRST_NAME AS 'NAME' AND LAST_NAME AS '' BY DEPARTMENT BY EMP_ID AS 'EMPLOYEE,NUMBER' ON TABLE SET PAGE-NUM OFF ON TABLE SET ONLINE-FMT HTML ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The output is:
This request customizes the column title for the calculated value REV.
TABLE FILE SALES SUM UNIT_SOLD RETAIL_PRICE COMPUTE REV/D12.2M = UNIT_SOLD * RETAIL_PRICE;AS 'GENERATED REVENUE' BY PROD_CODE WHERE CITY EQ 'NEW YORK' ON TABLE SET PAGE-NUM OFF ON TABLE SET ONLINE-FMT HTML ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, $ ENDSTYLE END
The output is:
You can change the default column title using the optional TITLE attribute for a field. Any formatting you apply to the field will be applied to its customized title.
See the TIBCO WebFOCUS® Developing Reporting Applications manual for details on the TITLE attribute.
How to: |
The command SET QUALTITLES determines whether or not duplicate field names appear as qualified column titles in report output. A qualified column title distinguishes between identical field names by including the segment.
Column titles specified in an AS phrase are used when duplicate field names are referenced in a MATCH command, or when duplicate field names exist in a HOLD file.
SET QUALTITLES = {ON|OFF}
where: