Usage Note 23356: How to selectively format one row of output created by a table template
To change the output from a procedure using a table template, PROC TEMPLATE can be used to edit the table template. It is not possible to apply more than one format to a column in a table. However, the TRANSLATE statement can be used to change the look of one or more rows.
In the PROC TEMPLATE code on the Full Code tab, the TRANSLATE statement is used to change the look of the Levels column only for the row where the Name column's value is AIR.
To apply a format to a cell or multiple cells within a row with PROC REPORT, see SAS Note 38776, "How to apply a format to a cell or multiple cells within a row with PROC REPORT."
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The sample code below creates two tables. The default output is displayed in the first one.
The PROC TEMPLATE code uses the TRANSLATE statement to change the look of the Levels column only for the row where the Name column's value is AIR.
ods html file="file.html";
ods select members;
title "Default output with unedited table template";
proc datasets library=sashelp mt=data;
run;
quit;
ods path work.template(update) sashelp.tmplmst;
proc template;
edit base.datasets.members;
edit level;
format=3.;
translate (name='AIR') into put(_val_,dollar3.);
end;
end;
run;
ods select members;
title "Table template using the TRANSLATE statement";
proc datasets library=sashelp mt=data;
run;
quit;
ods html close;
/* Delete the updated table template, if desired */
proc template;
delete base.datasets.members;
run;
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> HTML
|
Date Modified: | 2003-09-22 11:23:31 |
Date Created: | 2003-08-08 16:55:26 |