Proc Report and Proc Tabulate can both be used to create summary tables. Proc Report has the added feature of being able to create detail tables, as well. Proc Report has some of the power of a DATA step program, in that REPORT allows you to calculate a new report item (like BONUSAMT) in a COMPUTE block -- something which TABULATE will not do.
It's easier, or maybe just different, to get many crossings in the row and column dimension with TABULATE. TABULATE produces 3 dimensions of reports -- PAGE, ROW and COLUMN dimension using a TABLE statement along with a CLASS and VAR statement. REPORT does everything with a COLUMN statement and DEFINE statements, along with COMPUTE blocks.
With PROC REPORT, you can write lines between groups (such as "Good job on Sales this quarter, Department 99" or "Focus on improving sales, Department 45") with the LINE statement-- whereas with TABULATE, you cannot do this.
The following code example shows approximately the same table for both REPORT and TABULATE, the basic highlighting of PREDICT and ACTUAL is done, in this case, with a user-defined format. With PROC REPORT, you could also highlight a cell, or an entire row using the CALL DEFINE statement, too.
cynthia
[pre]
proc format;
value salef 21000-22000 = 'yellow'
22000<-23000 = 'pink';
run;
ods listing close;
ods html file='hilight.html' style=sasweb;
title 'Proc Report';
proc report data=sashelp.prdsale nowd;
column country product region,('Sales' predict actual);
define country /group;
define product /group;
define region /across ;
define predict / sum 'Predicted'
style(column)={background=salef.};
define actual /sum 'Actual'
style(column)={background=salef.};
rbreak after / summarize;
run;
title 'Proc Tabulate';
proc tabulate data=sashelp.prdsale f=dollar12.2;
class country region product;
var predict actual ;
table country * product all,
region*Sum*(predict actual)*{s={background=salef.}};
keylabel Sum='Sales'
All='Total';
run;
ods html close;
[/pre]