Procedure features: |
STYLE=
option in
| PROC REPORT statement |
| CALL DEFINE statement |
| COMPUTE statement |
| DEFINE
statement | |
|
Other features: |
ODS HTML statement
|
Data set: |
GROCERY
|
Formats: |
$MGRFMT. and $DEPTFMT.
|
This example creates HTML files and sets the style elements for each
location in the report in the PROC REPORT statement. It then overrides some
of these settings by specifying style elements in other statements.
libname proclib 'SAS-data-library';
options nodate fmtsearch=(proclib);
| ods html body='external-file'; |
| proc report data=grocery nowd headline headskip |
| style(report)=[cellspacing=5 borderwidth=10 bordercolor=blue] |
| style(header)=[foreground=yellow font_face=lucida
font_style=italic font_size=6] |
| style(column)=[foreground=moderate brown
font_face=helvetica font_size=4] |
| style(lines)=[foreground=white background=black font_face=lucida
font_style=italic font_weight=bold font_size=5] |
| style(summary)=[foreground=cx3e3d73 background=cxaeadd9
font_face=helvetica font_size=3 just=r]; |
| column manager department sales; |
| define manager / order
order=formatted
format=$mgrfmt.
'Manager' |
| style(header)=[foreground=white
background=black]; |
| define department / order
order=internal
format=$deptfmt.
'Department' |
| style(column)=[font_style=italic]; |
| break after manager / summarize; |
| compute after manager
/ style=[font_style=roman font_size=3 font_weight=bold
background=white foreground=black]; |
| line 'Subtotal for ' manager $mgrfmt. 'is '
sales.sum dollar7.2 '.';
endcomp; |
| compute sales;
if sales.sum>100 and _break_=' ' then
call define(_col_, "style",
"style=[background=yellow
font_face=helvetica
font_weight=bold]");
endcomp; |
| compute after;
line 'Total for all departments is: '
sales.sum dollar7.2 '.';
endcomp; |
| where sector='se'; |
| title 'Sales for the Southeast Sector';
run; |
| ods html close; |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.