The SAS Output Delivery System and reporting techniques

Include a spanned row for footnotes in a ODS rtf tabe output

Reply
Occasional Contributor
Posts: 8

Include a spanned row for footnotes in a ODS rtf tabe output

Hello,

I am outputting a table in the style of the one in paper 246-2011, page 9, by Allison Booth. I would like to add references in the table at the bottom. I was looking for an example online but haven't found one. My thought is to create a column called references. I'm just wondering if someone has any example they can share with me.

Thanks.

Super User
Posts: 17,831

Re: Include a spanned row for footnotes in a ODS rtf tabe output

Any reason to not use a footnote statement?

Occasional Contributor
Posts: 8

Re: Include a spanned row for footnotes in a ODS rtf tabe output

Thanks. I did. It put them in the header/footer of the rtf. So I added BODYTITLE_AUX. So now they are in separate cells from the table, but on the same page. I now would like to get it all together with no further editing from me.


SAS Super FREQ
Posts: 8,743

Re: Include a spanned row for footnotes in a ODS rtf tabe output

Hi:

I don't understand what you mean by "get it all together" -- do you mean you want ENDNOTES, like the APA endnotes or like notes at the end of an academic paper? There are 2 standards for annotating papers -- one where a footnote appears on the bottom of the page on which the footnote appears -- so footnotes 1 and 2 would appear on the bottom of page 1 and then you might have footnote 3 on page 5 and footnote 4 on page 18. Or there is a standard where you use note numbers and then show an entire list of "end notes", numbered from 1 to ???. See this Microsoft explanation and picture as a reference: Should you use footnotes, or endnotes? - Create footnotes and endnotes

From your description, it's not clear to me which one you are asking for. It sounds to me like you have implemented footnotes. Do you want to have notes at the bottom of the table (so if table 1 has footnotes 1 and 2, you want those notes to appear under that table?) and if your table 2 has footnotes 3 and 4, you want those notes to appear under that table -- perhaps instead of the bottom of the page??? Endnotes shouldn't be too hard to put together. It depends on your destination and how you want to define them. I don't know if the RTF specification has RTF control strings for ENDNOTES, but it is fairly easy to implement end notes in a separate table without using RTF control strings, assuming you have the notes in a SAS dataset/table. Here's an example of "table" notes instead of footnotes using PROC REPORT.
     

Cynthia

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;


table_notes.png
Occasional Contributor
Posts: 8

Re: Include a spanned row for footnotes in a ODS rtf tabe output

Thank you. This was very helpful.

Ask a Question
Discussion stats
  • 4 replies
  • 605 views
  • 0 likes
  • 3 in conversation