Usage Note 23672: How can I prevent PROC REPORT from adding a border around cells that are missing?
Currently, there is not a way to prevent PROC REPORT from adding
a borders when a cell has a missing value. However, you can create your
own borders for the cell values using the CSS style properties. In the
below example, The RULES= attribute is set to GROUPS so that a border
is added below the column headers and not the cell values. For the
variables NAME and HEIGHT, borders are specified for the top and left
of borders of the cell that is white and 1PX in width. For any missing variable,
the borders are added conditionally. If the value of SEX is not missing,
then a top border is added with a width of 1PX and a color of white;
otherwise a border is not added.
By default, the order variable SEX will display only
the first occurrence of the value in the HTML file. If the
value does not change, you have empty cells with borders around them. View
output.
ods html file='temp.html';
proc report data=sashelp.class nowd
style(report)={cellspacing=0 rules=groups};
col sex name height;
define sex / order;;
define height / sum;
compute height;
call define(_col_,"style",
"style={htmlstyle='border-top:1px solid white;
border-left:1px solid white'}");
endcomp;
compute name;
call define(_col_,"style",
"style={htmlstyle='border-top:1px solid white;
border-left:1px solid white'}");
endcomp;
compute sex;
if sex ne ' ' then
call define(_col_,"style",
"style={htmlstyle='border-top:1px
solid white'}");
endcomp;
run;
ods html close;
See also the full PROC TEMPLATE FAQ and Concepts.
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.
| Type: | Usage Note |
| Priority: | low |
| Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> HTML
|
| Date Modified: | 2004-02-06 11:10:06 |
| Date Created: | 2004-02-04 12:05:33 |