Hi:
PROC REPORT has the ability to produce either GROUP (summary) or ORDER (detail) reports.
For example, this code:
[pre]
proc report data=sashelp.shoes nowd;
column region subsidiary sales;
define region / order;
define subsidiary / order;
define sales/ sum;
break after region / summarize;
run;
[/pre]
In the above report, I would see a detail line for every observation, ordered by region/subsidiary, with a summary line underneath every region. For example, if the dataset has 500 observations, I would have at least 500 report rows. If I have 10 regions in the data, then the detail report would also have 10 summary lines.
If I ONLY want to see the REGION information -- or 10 summary lines for each REGION, then the above code needs to drop subsidiary and change the usage for REGION to GROUP:
[pre]
proc report data=sashelp.shoes nowd;
column region sales;
define region / group;
define sales/ sum;
rbreak after / summarize;
run;
[/pre]
Now, I will only see the summarized sales for each region, without any detail lines coming from the subsidiary information.
Or, you could use other procedures, like PROC MEANS or PROC SQL to "pre-summarize" the data and then pass the summary info to PROC REPORT. This does, however, require 2 passes through the data -- which isn't too horrible for small to medium datasets, but really unnecessary, when PROC REPORT will do it in one step...summarizing and reporting.
cynthia