That is just the default output from proc means, you can switch it off by adding noprint in as below. The dataset created at the end of the step, contians the data need to create your report, you would then proc report that data using your style:
proc means data=have noprint; <<<<Replace have with your data here
class country;
var salary;
output out=subtotal sum=salary;
run;
data want;
set have (in=a) subtotal (in=b); <<<<Replace have with your data here
if b then country=cat(strip(country)," Total");
run;
proc sort data=want;
by country employee;
run;
ods pdf file="....pdf";
proc report...;
...;
run;
ods pdf close;
Obviously replace the elipses with the necessary information, file path/name, and the proc report code. Could be as simple as:
proc report data=want nowd;
columns _all_;
run;
That will give basic output, likely you will need a computed style call though for highlighting the totals, maybe something like:
proc report data=want nowd;
columns _all_; compute country; if index(country,"Total") then call define(_row_,'style','style=[font_weight=bold]'); endcomp; run;
Something like that, you will have to play with it. There is a lot of information out there on proc report, which is a huge procedure, you may even be able to compute your subtotals directly in that procedure:
https://communities.sas.com/t5/SAS-Procedures/How-to-Label-totals-and-subtotals-in-PROC-Report/td-p/430403
https://communities.sas.com/t5/SAS-Procedures/proc-report-subtotal-when-using-group-noprint/td-p/124710
Personally though I like to get my data looking the right way first, then using a basic proc report output.
... View more