The SAS Output Delivery System and reporting techniques

ODS RTF document formatting

Reply
Occasional Contributor
Posts: 14

ODS RTF document formatting

If I want to insert RTF code that will impact the whole document (in this case, I want to change the page number formatting to roman numerals) where would I put that in my code? I've tried adding to the first title in the header and to the page number code and neither has any impact.

Thanks

Rose
SAS Super FREQ
Posts: 8,868

Re: ODS RTF document formatting

Rose:
This is a question best answered by Tech Support. I do not know the RTF control string for changing the page number to Roman numerals. I do know that in SAS 8 (before 'Escapechar + {Pageof}' was available), I could do this to get the page number in either the title or the footnote.

I know that RTF is very picky -- one wrong \ or {} and Word will not open the RTF file. That's why Tech Support is your best bet for more help on this question.

cynthia
[pre]
ods listing close;

***** RTF Example *****;
ods path work.rtftemp(update)
sashelp.tmplmst(read);

proc template;
define style styles.RTFControlWords;
parent=styles.rtf;
style systemtitle from _self /
protectspecialchars=off;
style systemfooter from _self /
protectspecialchars=off;
end;
run;

ods rtf file='c:\temp\regular_page.rtf' style=RTFControlWords;

proc print data=sashelp.shoes(obs=50);
var region product sales;
title j=r '{\field{\pgnucrm{\*\fldinst{\pard\b\i0\chcbpat8\qc\fs19 {PAGE }\cf0\chcbpat0}}}}';
footnote '{\field{\*\fldinst{\pard\b\i0\chcbpat8\qc\fs19\pgnlcrm{PAGE }\cf0\chcbpat0}}}';
run;
ods rtf close;

title; footnote;

[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 129 views
  • 0 likes
  • 2 in conversation