Hi:
So now, I'm confused, what happened to "old" and "modern"?? What do the numbers for COUNTY represent??? Should the values for COUNTY be added up or are they merely identifiers???
Since your data is stil not clear to me, consider the program below that uses a subset of SASHELP.SHOES. The program produces 3 reports:
1) a detail report -- where the main report items are all defined with a usage of DISPLAY and then the report shows the total count of observations for the 2 regions on the report and
2) a detail report -- where the main report items are all defined with a usage of ORDER and there is a summary line between groups and at the end of the report and
3) a summary report -- where the observations are "collapsed" by region and product because they are defined as GROUP usage and the SUBSIDIARY variable has been removed from the report to show the impact on the N statistic and the totals.
The various BREAK and RBREAK statements are writing the summary lines to the report. The usage of DISPLAY or ORDER or GROUP is what determines whether a report is a "detail" report or a "summary" report. With a usage of DISPLAY, the only total that is available to you is the "grand total" or the report total. Once you move into the world of ORDER or GROUP usage, then you can put subtotals or group totals on the report. If you don't know how PROC REPORT operates, it will be useful for you to carefully compare the differences between the 3 reports so that you understand what I meant when I said that PROC REPORT will suppress the repetitious display of GROUP or ORDER values on the report rows.
It seems too early to get into a discussion of the PAGE option for the BREAK statement yet until you are comfortable with the basics of PROC REPORT and report DEFINE statement usage and how usage works with break processing and whether a report is a detail report or a summary report.
As an alternate example, consider the PROC FREQ report produced as a second step in my program. It produces output that may be of some use to you.
cynthia
[pre]
ods listing close;
options nodate nonumber;
proc sort data=sashelp.shoes out=shoes;
by region product;
where region in ('Asia', 'Canada') and
product in ('Boot', 'Slipper');
run;
ods pdf file='c:\temp\show_diff_shoexxx.pdf';
proc report data=shoes nowd;
title '1) All Items DISPLAY with report total';
title2 'Note how COUNT is 1 for every row';
column region product subsidiary n;
define region / display;
define product / display;
define subsidiary / display;
define n / 'Row Count';
rbreak after / summarize;
compute after;
region = 'All Regions';
endcomp;
run;
proc report data=shoes nowd;
title '2) Use ORDER for REGION, PRODUCT and SUBSIDIARY items with report total';
column region product subsidiary n;
define region / ORDER;
define product / ORDER;
define subsidiary / ORDER;
define n / 'Subsidiary Row Count';
rbreak after / summarize;
break after region / summarize;
compute after region;
line ' ';
endcomp;
compute after;
region = 'All Regions';
endcomp;
run;
proc report data=shoes nowd;
title '3) Use GROUP for REGION and PRODUCT items';
title2 'To show summary or "collapse" of rows, subsidiary has been removed from the report';
column region product n;
define region / GROUP;
define product / GROUP;
define n / 'Subsidiary Row Count';
rbreak after / summarize;
break after region / summarize;
compute after region;
line ' ';
endcomp;
compute after;
region = 'All Regions';
endcomp;
run;
ods pdf close;
[/pre]
ods pdf file='c:\temp\show_freq.pdf';
title 'Show PROC FREQ with LIST option';
proc freq data=shoes nlevels;
tables region*product / list;
run;
ods pdf close;