Hi:
Formats can be applied for a break line using a CALL DEFINE statement, as shown in the following program.
When you run PROC REPORT with BREAK and RBREAK statements, PROC REPORT creates an internal variable named _BREAK_ that contains a value which tells you whether the current line was generated by a BREAK or RBREAK statement. If the line is based on break statement, then the value of _BREAK_ is the name of the group variable; if the line is based on an RBREAK statement, then the value of _BREAK_ is _RBREAK_; if the report line does not come from a BREAK or RBREAK statement being executed, then the value of _BREAK_ is blank.
For more help on CALL DEFINE or the use of _BREAK_ or _RBREAK_, consult the PROC REPORT documentation or possibly contact Tech Support for more help.
cynthia
[pre]
ods listing close;
data shoes;
set sashelp.shoes;
brk1 = 1;
brk2 = 2;
run;
ods html file='c:\temp\call_def_format.html' style=sasweb;
proc report data=shoes nowd;
where region in ('Asia', 'Canada') and
product contains ('Dress');
column brk1 brk2 product region,(sales sales=sl_n);
** set brk1 and brk2 to NOPRINT after you understand;
** how they are used to change the format;
define brk1 / group '_c1_';
define brk2 / group '_c2_';
define product /group '_c3_';
define region / across 'Region/_c4_, _c5_, _c6_, _c7_';
define sales/sum f=dollar15.;
define sl_n/n f=comma15. 'N';
break after brk1 / summarize;
break after brk2 / summarize;
rbreak after / summarize;
compute sl_n;
if upcase(_break_) = 'BRK1' then do;
call define('_c4_', 'format', 'dollar15.2');
call define('_c5_', 'format', 'comma15.2');
call define('_c6_', 'format', 'dollar15.2');
call define('_c7_', 'format', 'comma15.2');
end;
else if upcase(_break_) = 'BRK2' then do;
call define('_c4_', 'format', 'dollar15.3');
call define('_c5_', 'format', 'comma15.4');
call define('_c6_', 'format', 'dollar15.3');
call define('_c7_', 'format', 'comma15.4');
end;
else if _break_ = '_RBREAK_' then do;
call define('_c4_', 'format', 'dollar15.1');
call define('_c5_', 'format', 'comma15.1');
call define('_c6_', 'format', 'dollar15.1');
call define('_c7_', 'format', 'comma15.1');
end;
endcomp;
compute after brk2;
product = 'brk2';
endcomp;
compute after brk1;
product = 'brk1';
endcomp;
compute after;
product = '_RBREAK_';
endcomp;
run;
ods html close;
[/pre]