How to: Reference: |
When you use the ACROSS COLUMNS phrase to select and order the columns that display on the report output for an ACROSS sort field, you can assign each selected column a new column title using an AS phrase.
ACROSS sortfield [AS title] COLUMNS aval1 [AS val1title] [{AND|OR} aval2 [AS val2title] [... {AND|OR} avaln [AS valntitle]]]
where:
Is the ACROSS field name.
Is the title for the ACROSS field name.
Is required to separate the selected ACROSS values. AND and OR are synonyms for this purpose.
Are the selected ACROSS values to display on the report output.
Are the column titles for the selected ACROSS values.
Note: For styled output formats, SET HIDENULLACRS=ON removes empty columns in ACROSS groups from the report output.
The following request against the GGSALES data source selects the columns Coffee Grinder, Latte, and Coffee Pot for the ACROSS field PRODUCT, and assigns each of them a new column title.
TABLE FILE GGSALES SUM DOLLARS/I8M AS '' BY REGION ACROSS PRODUCT AS 'Products' COLUMNS 'Coffee Grinder' AS 'Grinder' OR Latte AS 'caffellatte' AND 'Coffee Pot' AS 'Carafe' ON TABLE SET PAGE NOPAGE END
The output is:
Products Region Grinder caffellatte Carafe --------------------------------------------------------- Midwest $666,622 $2,883,566 $599,878 Northeast $509,200 $2,808,855 $590,780 Southeast $656,957 $2,637,562 $645,303 West $603,436 $2,670,405 $613,624
WebFOCUS |