BookmarkSubscribeRSS Feed
Rose_G
Calcite | Level 5
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
1 REPLY 1
Cynthia_sas
SAS Super FREQ
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]

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 712 views
  • 0 likes
  • 2 in conversation