I am attempting to name a total line. In a simplified example I am able to name the total line.
data example;
input a $ b $ mydate mmddyy8.;
datalines;
wilma stone 01122001
wilma stone 02122001
wilma stone 01012001
fred stone 03052008
fred stone 03152008
fred stone 03152009
;
run;
title 'MIN and MAX date per patient';
proc report nowd data=example;
column a b, mydate;
compute mydate;
if a='wilma' then call define(_col_, 'format','dollar10.');
endcomp;
define a / group;
define b / across;
rbreak after / summarize dol dul;
compute after;
a='total line';
endcomp;
run;
Is there something I am doing differently in the block below that causes the total line to not be named?
title 'Teaching and Research Faculty Profile (Fall)';
proc report data= myemployee out= T_R_Integer;
column tenure2 academic_period_desc , displayNum;
define displayNum / analysis '';
define academic_period_desc / across '';
define tenure2 / group '' order = internal left;
rbreak after / summarize dol dul;
compute after;
tenure2='4';
endcomp;
where employee_category = 'T & R Faculty';
run;
Apparently it has something to do with that tenure2 is a number. Is this a bug?
Is there a way to make the format statement take effect to the total line text. It seems to be capped based on the pervious format.
data example;
input a $ b $ mydate mmddyy8.;
datalines;
wilma stone 01122001
wilma stone 02122001
wilma stone 01012001
fred stone 03052008
fred stone 03152008
fred stone 03152009
;
run;
title 'MIN and MAX date per patient';
proc report nowd data=example;
column a b, mydate;
compute mydate;
if a='wilma' then call define(_col_, 'format','dollar10.');
endcomp;
define a / group format= $200.;
define b / across;
rbreak after / summarize dol dul;
compute after;
a='total line this is a huge amount of characters';
endcomp;
run;
This worked.
data example;
input a $100. b $ mydate mmddyy8.;
datalines;
wilma stone 01122001
wilma stone 02122001
wilma stone 01012001
fred stone 03052008
fred stone 03152008
fred stone 03152009
;
run;
title 'MIN and MAX date per patient';
proc report nowd data=example;
column a b, mydate;
/*compute mydate;
if a='wilma' then call define(_col_, 'format','dollar10.');
endcomp;*/
define a / group format= $200.;
define b / across;
rbreak after / summarize;
compute after;
a='total line this is a huge amount of characters';
endcomp;
run;
Unfortunately this didn't work for my larger program.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.