Hi,
The confusing thing, I think, is that using a BY statement in PROC REPORT frequently changes how your total lines appear or are calculated. That's because using a BY statement causes SAS to treat each BY group like a separate entity (many SAS procedures work this way -- not just PROC REPORT). So in those instances, with a BY statement (BY MY_BY_VAR), both BREAK AFTER MY_BY_VAR and RBREAK AFTER will give you the same number.
For example, this code
[pre]
options nocenter nodate nonumber nobyline;
proc sort data=sashelp.shoes out=shoes;
by product region;
run;
proc report data=shoes nowd;
title 'For Product: #byval(product)';
by product;
where region in ('Asia', 'Canada', 'Pacific');
column product region sales;
define product /group noprint;
define region /group;
define sales /sum;
break after product / summarize;
rbreak after / summarize;
compute after product ;
region = 'Break Stmt';
endcomp;
compute after ;
region = 'Rbreak Stmt';
endcomp;
run;
[/pre]
produces this output (only 2 BY groups shown) (Because of the way I customized the break lines, you can see which line is coming from the Break versus the Rbreak statement):
[pre]
For Product: Sandal
Region Total Sales
Asia $8,208
Canada $14,798
Pacific $48,424
Break Stmt $71,430
Rbreak Stmt $71,430
********************************* next by group
For Product: Slipper
Region Total Sales
Asia $152,032
Canada $952,751
Pacific $390,740
Break Stmt $1,495,523
Rbreak Stmt $1,495,523
[/pre]
So the solution, if you're going to use BY groups in order to get #BYVAL capability in the title, is to use EITHER BREAK AFTER your BY variable or RBREAK AFTER, but not both (speaking of the BY variable only here). If you experiment with the above code, you should then be able to figure out how your program has to change. Otherwise, you might consider contacting Tech Support for more PROC REPORT help.
cynthia