Place a footnote in a particular alignment with proc report

advertisements

I would like to to have my footnote just under the bottom of my table and perfectly left aligned with the left hand side data of the table. Can someone help me to achieve that ?

Currently

           ___________bottom line of table___________ 

Note: Is my footnote just under the line and aligned ?

But would like this :

 ______________bottom line of table here________
 Note: Is my footnote just under the line and aligned ?

Here is the code :

data test;
input alpha $1-16 beta $18-41;
cards;
abc+def+ghi+jkl (zmc*[100]/1000-200)+23)
cab+ddd+ggg+jjj (zab*[100]/1000-200)+21)
;
run;

%let path=C:\;
ODS LISTING CLOSE;
ODS RTF  PATH="&path." FILE='test.rtf '

                       BODYTITLE;
ODS TRACE ON;
ODS ESCAPECHAR='^';
ODS PATH SHOW;

proc report data=TEST  nowd
style(report)=[background=white fontstyle=roman fontsize=2.5  fontweight=medium  width=85% fontfamily='courier new']
style(header)=[background=white foreground=blue fontstyle=roman fontsize=2.5  fontweight=medium just=left fontfamily='courier new']
style(column)=[background=white fontstyle=roman fontsize=2.5  fontweight=medium fontfamily='courier new' ]
;
title   "^S={ fontstyle=roman fontsize=2.5 fontweight=medium fontfamily='courier new'} testsing my footnote";
footnote"^S={fontstyle=roman just=l fontfamily='courier new'fontsize=2.5 fontweight=medium } Note: Is my footnote just under the line and aligned ?";

column alpha beta;
define alpha/order ;
define  beta/order;

compute before;
line @1 '';
endcomp;

run;

ODS RTF CLOSE;
ODS LISTING;


Not a great solution, but replace just=l with j=l outside of the escapes, then add some spaces to align it to the table.

footnote j=l "^S={fontstyle=roman just=l fontfamily='courier new'fontsize=2.5 fontweight=medium } Note: Is my footnote just under the line and aligned ?";

Otherwise to get it perfectly aligned underneath the table and by default and left aligned use a spanned row as part of your proc report, see the example below.

options nodate nonumber;
title 'Notes After Every Table';

ods rtf file='c:\temp\tablenote.rtf' startpage=no;
ods escapechar='^';

proc report data=sashelp.class nowd;
  column sex height,(Min Mean Max N);
  define sex / group 'Sex ^{super 1}';
  define height /analysis 'Height';
  compute after / style={just=l};
    line '^{super 1} Age span for students 11-16 years';
  endcomp;
run;

proc report data=sashelp.class nowd;
  column sex weight,(Min Mean Max N);
  define sex / group 'Sex ^{super 2}';
  define weight /analysis 'Weight';
  compute after / style={just=l};
    line '^{super 2} Note there are more boys than girls';
  endcomp;
run;
ods _all_ close;

Courtesy of Cynthia [email protected]: https://communities.sas.com/message/231503#231503