The SAS Output Delivery System and reporting techniques

RTF Assistance

Not applicable
Posts: 0

RTF Assistance

I would like to insert a horizontal line at the top of my footnotes.
I believe this can be acheived using RTF, but am unsure exactly how to go about doing it.
Can anybody please provide assistance?

Many thanks.
Posts: 9,367

Re: RTF Assistance

Posted in reply to deleted_user
Hi, Here are some program techniques that you can use. They show using both ODS ESCAPECHAR (set to '^' and used for ^{pageof} in the title and the ^S in the footnote and the insertion of RTF control strings into footnote text for the line. The RTF strings should be passed as shown below, with the space after the 'brdrw1 '. (I included the ^{pageof} example because most of my students who want the footnote line also want the ^{pageof} in their output.

If you are using SAS 8.2, then ODS ESCAPECHAR for ^S will work for you; however, ^{pageof} is a technique that will only work in SAS 9. If you are not using SAS 9, there is an RTF control string that will do that same thing as ^{pageof}. You can find that string described here:
options nodate nonumber;

title1 j=l font='Arial' h=10pt "Some Pharma Name";
title2 j=l font='Arial' h=10pt "Protocol XXX"
j=r font='Arial' h=10pt "^{pageof}";

title3 j=c font='Arial' h=10pt "Table xxx 7.2";
title4 j=c font='Arial' h=10pt "Listing of Serious Adverse Events";

** make sure there is a SPACE between the 1 and the quote;
** in the second line of the footnote below;
** The \~ is used for a non-breaking space in RTF at the end of the footnote;
footnote j=l font='Arial' h=10pt
"^S={protectspecialchars=off "
"pretext='\brdrt\brdrs\brdrw1 '}"
footnote2 j=l font='Arial' h=10pt "(+: Relative to the date of the first application.)";
footnote3 j=l font='Arial' h=10pt "Prepared by: Fred Rogers"
j=r font='Arial' h=10pt "%sysfunc(datetime(), datetime16.)";

ods listing close;
ods rtf file='c:\temp\stuff.rtf';

ods escapechar='^';
proc print;
var region product subsidiary sales returns;

ods rtf close;
title; footnote;
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation