Hi:
To make PROC REPORT break where you want, if I were going to solve this, I would create a new variable to be used only to control the break processing. Instead of trying to control breaking by A1, A2, A3 and date, I'd make one variable to control break processing.
In my program, I call this new variable SUPERORD and it is the concatenation of the values for A1, A2, A3, month and year. Then, I use the SUPERORD variable in my REPORT code as the ORDER variable and use BREAK AFTER SUPERORD to get the summary line on the report after each unique value of SUPERORD.
In the code below, SUPERORD is created when I read the raw data lines. However, it could just as easily be created right before the report step with a data step program:
[pre]
data test;
set your_dataset_here;
mm = put(month(date),z2.);
year = put(year(date),4.);
superord = catt(a1,a2,a3,mm,year);
run;
[/pre]
At any rate, the program below is the one that produced the output in my previous post. To see what the SUPERORD variable looks like, either do a PROC PRINT before the PROC REPORT step or remove the NOPRINT option from the PROC REPORT DEFINE statement for SUPERORD.
cynthia
[pre]
data test;
length superord $18;
infile datalines;
input a1 $ a2 $ a3 $ date : mmddyy10. amt;
mm = put(month(date),z2.);
year = put(year(date),4.);
superord = catt(a1,a2,a3,mm,year);
return;
datalines;
9072 0300 8000 01/23/2009 50000
9072 0700 5000 02/07/2009 60000
9072 0700 5000 02/08/2009 70000
9072 0800 9000 02/24/2009 67000
9072 0800 9000 02/25/2009 75000
9072 0100 4000 03/27/2009 45000
9072 0100 4000 03/28/2009 69000
9072 0700 5000 04/14/2009 75000
9072 0700 5000 04/15/2009 37670
;
run;
title; footnote;
ods listing ;
ods html file='c:\temp\superord.html' style=sasweb;
proc report data=test nowd;
column superord a1 a2 a3 date amt;
define superord / order order=data noprint;
define a1 /display;
define a2 / display;
define a3 / display;
define date/ f=mmddyy10. display;
define amt / sum 'Amount';
break after superord / summarize ol;
compute after superord;
line ' ';
endcomp;
run;
ods html close;
[/pre]