Hi: I think I see what you're experiencing. You are limited to the length of the ORIGINAL variable. I think Origin is a length of $6, so you would only see "Grand", and not "Grand Total". I don't exactly see how your posted code produced the output in the XLS file, but I already had an example that used SASHELP.CLASS, so I'm posting it below. You can see that the SEX variable only shows 'G' at the break in report #1, while with the NAME variable, the break shows "Grand To" because NAME is a length of $8. Then #3a and #3b show two possible workarounds. As for recommended reading, I like this topic in the doc entitled, "How PROC REPORT Builds a Report" and this paper (http://support.sas.com/resources/papers/ProcReportBasics.pdf) and the PROC REPORT "Concepts" section is good too. cynthia ods html file='c:\temp\compare_total.html' style=sasweb; proc report data=sashelp.class; column sex age height weight; title '1) Will Only See "G" in the break line'; title2 'because length of SEX var is $1'; define sex / order; define age / order; define name / order; compute sex; if _break_ = "_RBREAK_" then do; sex = 'Grand Total'; end; endcomp; rbreak after / summarize; run; proc report data=sashelp.class; column name age height weight; title '2) Will Only See "Grand To" in the break line'; title2 'because length of NAME var is $8'; define name / order; define age / order; compute name; if _break_ = "_RBREAK_" then do; name = 'Grand Total'; end; endcomp; rbreak after / summarize; run; proc report data=sashelp.class; column name age height weight; title '3a) Will Now See "Grand Total" in the break line'; title2 'Because the PRETEXT element is added without regard to the variable length'; title3 'This technique might not work in all situations'; define name / order; define age / order; compute name; if _break_ = "_RBREAK_" then do; call define(_col_,'style','style={pretext="Grand Total"}'); end; endcomp; rbreak after / summarize; run; proc report data=sashelp.class; column name showname age height weight; title '3b) Will Now See "Grand Total" in the break line'; title2 'This uses a COMPUTED item with a length big enough for the string'; define name / order noprint; define showname / computed; define age / order; compute showname/character length=12; if _break_ = "_RBREAK_" then do; showname = "Grand Total"; end; else showname = name; endcomp; rbreak after / summarize; run; ods html close;
... View more