Hi:
I had a version of this program as an example in my paper, Creating Complex Reports, which I presented at SAS Global Forum. The paper can be found here:
http://www2.sas.com/proceedings/forum2008/173-2008.pdf (see page 2 for your report...it can be produced with PROC PRINT, PROC REPORT and DATA _NULL_).
And the programs can be downloaded from here:
http://support.sas.com/rnd/papers/ (scroll until you see the paper title....then follow the link to download the zip file of programs.)
There are a couple of other ways to put extra summary lines at the bottom of PROC REPORT output, without going down the PROC TEMPLATE road (just yet!).
cynthia
ps...in the programs to download, this program is called figure1_2.sas -- however, it did not use BY group processing. I've changed the PROC REPORT example below to use BY group processing (in which case, you might want to NOPRINT the DEFINE statement for SEX in the code, after you see how it's working.)
[pre]
proc sort data=sashelp.class out=class;
by sex name;
run;
title; footnote;
ods listing close;
ods html file='figure1_2.html' style=egdefault;
proc report data=class nowd
style(summary) = Header
style(lines) = Header;
by sex;
column sex name age height height=htdisp;
define sex / group
style(column)=Header;
define name / display;
define age / display;
define height / n noprint;
define htdisp /sum;
compute after sex;
if sex = 'F' then
prtline = 'Female Students N ='||put(height.n,3.0);
else if sex = 'M' then
prtline = 'Male Students N ='||put(height.n,3.0);
line prtline $30.;
endcomp;
run;
ods html close;
[/pre]