Hi:
Here's a sample that I use in class. The PROC REPORT "ACROSS" usage will produce crosstabs the way you want. So will PROC TABULATE. Compare these 2 outputs:
[pre]
proc report data=sashelp.shoes nowd;
title 'proc report Across';
where region in ('Asia', 'Canada') ;
column product region,(n sales);
define product /group;
define region /across;
define n / 'Count';
define sales /sum;
rbreak after / summarize;
compute after;
product='Total';
endcomp;
run;
proc tabulate data=sashelp.shoes f=7.0;
where region in ('Asia', 'Canada') ;
title 'TABULATE cross-tab';
class product region;
var sales;
table product all,
region * sales=' ' *(n sum*f=comma10.)
all * sales=' '*(n sum*f=comma10.);
keylabel n='Count'
sum='Total Sales'
all='Total';
run;
[/pre]
If you run the 2 procedures and compare the output, you will see that the PROC TABULATE report has a total column to the far right of the report table. This last set of columns comes from the CLASS variable ALL. This is one of the big features and advantages of PROC TABULATE. It is possible, but harder, to get a TOTAL column on the far right of the PROC REPORT output. To achieve it, you would have to use absolute column names in a compute block to get an overall total column.
The documentation for PROC REPORT and the documentation for PROC TABULATE will help you understand how to use each procedure.
cynthia