Hi:
Here's a PROC REPORT example that formats the summary line differently. Note how with PROC REPORT, you are changing the format in a CALL DEFINE Statement -- so each column has its own CALL DEFINE and while I have given them all DOLLAR formats, notice how INVENTORY is formatted as dollar15.0 on the summary line, while the other numeric columns are formatted with dollar15.2 -- Also notice how the format for only some of the cells for Asia, Pacific and Canada rows have been changed.
[pre]
ods html file='c:\temp\diff_fmt.html' style=egdefault;
proc report data=sashelp.shoes nowd;
title 'different format';
column region sales inventory returns;
define region /group;
define inventory/sum f=comma15.2;
define returns/ sum f=comma15.2;
define sales /sum f=comma15.2;
rbreak after /summarize;
compute sales ;
if region = 'Canada' then
call define (_col_,'FORMAT',"dollar15.2");
if _break_ = '_RBREAK_' then
call define (_col_,'FORMAT',"dollar15.2");
endcomp;
compute inventory ;
if region = 'Pacific' then
call define (_col_,'FORMAT',"dollar15.2");
if _break_ = '_RBREAK_' then
call define (_col_,'FORMAT',"dollar15.0");
endcomp;
compute returns ;
if region = 'Asia' then
call define (_col_,'FORMAT',"dollar15.2");
if _break_ = '_RBREAK_' then
call define (_col_,'FORMAT',"dollar15.2");
endcomp;
compute after;
call define (_row_,'STYLE','style={background=pink}');
endcomp;
run;
ods html close;
[/pre]
You would use different syntax for PROC TABULATE if you wanted to apply a different format to a summary row. And this technique will not work for PROC PRINT at all.
cynthia