The SAS Output Delivery System and reporting techniques

Aligning Line total to the right

Regular Contributor
Posts: 178

Aligning Line total to the right

proc report data=post_deploy_3 nowd;

columns SALE_REP_NM acct_exec_nm THRD_PARTY_ORIG_NM THRD_PARTY_ORIG_CD Total_Count;

define SALE_REP_NM/ group Display style(column)={cellwidth=60pt just=center} "CRC" ;

define Total_Count/analysis sum ;

compute after;


line "Total" Total_Count.sum ;




The code works fine however the Total_Count (label=Grand Total) at the bottom needs to display under the total column.  Sample data enclosed.  It display near the middle of the bottom

Frequent Contributor
Posts: 88

Re: Aligning Line total to the right

Try this:


rbreak after / summarize;
compute after ;
  if _break_  = '_RBREAK_' then THRD_PARTY_ORIG_CD = 'Total';


If I understand what you're trying to do, this should give a last line with the total in the correct column, and the  word 'Total' in the column immediately to the left of the total value.


Regular Contributor
Posts: 178

Re: Aligning Line total to the right

Posted in reply to JerryLeBreton

Jerry you are a genious, thanks it worked, I will add this to my coding tips list

Ask a Question
Discussion stats
  • 2 replies
  • 1 like
  • 2 in conversation