The SAS Output Delivery System and reporting techniques

How exactly do you reset the page number in RTF output?

Reply
Contributor
Posts: 65

How exactly do you reset the page number in RTF output?

The instructions given on sas.com aren't enough detail. Please help!

I'm creating an RTF document and using the page number in a footnote. Suppose the RTF output I'm creating is Appendix A, and the footnote statement is

footnote "^S={just=c font_weight=medium font_face=arial font_size=8.5pt}Appendix A Page ^{thispage}";

where I've already specified ^ as the ODS escape character.

The RTF output file will eventually be included in another Word document, where the user has already written a report, which is the main part of the document. The RTF that I'm creating will be inserted into Word by the user, who will insert a section break after the end of their report and then insert the RTF file. The user wants the footnote in Appendix A to show Appendix A Page 1 on the first page, Appendix A Page 2 on the second page, and so on.
N/A
Posts: 0

Re: How exactly do you reset the page number in RTF output?

{Page} {\field{\*\fldinst{ PAGE }}}\~{of}\~{\field{\*\fldinst { SECTIONPAGES }}}
Contributor
Posts: 65

Re: How exactly do you reset the page number in RTF output?

Actually, no, that suggestion does not work.

The only thing that seems to work is to tell the user to insert the RTF in Word after the descriptive text, then have the user view the footer and choose the option to start page numbers from 1 in this section, instead of numbering continuously from the previous section.

I was hoping there was something I could specify in SAS to automate this.
N/A
Posts: 0

Re: How exactly do you reset the page number in RTF output?

Well, maybe.

The RTF created by SAS can honor the SAS Option
options pageno=50 ;
This will start the page numbering at 50. You cna also reset it. It does this by using the RTF specs
\pgnrestart\pgnstarts50 in the section data. The 50 comes from the SAS option.

You want to do the page numbering on the footnote, so you are probably cutting them off in the header body. Using option nonumber;
won't prevent the reset.

There is an undocumented and lightly tested (non production) feature in 9.1 that allows section data to be appended at new section breaks, for instance,

ODS RTF sectiondata="\sbknone" ;

It is not parsed so any use of it is not formally supported.
Ask a Question
Discussion stats
  • 3 replies
  • 384 views
  • 0 likes
  • 2 in conversation