The SAS Output Delivery System and reporting techniques

ToC with ODS RTF --> code previously worked with SAS 9.1.3 but not with SAS 9.4

Accepted Solution Solved
Reply
Contributor
Posts: 30
Accepted Solution

ToC with ODS RTF --> code previously worked with SAS 9.1.3 but not with SAS 9.4

Hello,

In SAS V9.1.3, the code below allows us to insert a toc field in the RTF file (thanks to the ods proclabel statement). Then we compile together each RTF files into a single RTF document, and it was then easy to generate to ToC of the document.

I would have expected that it will continue to work in SAS V9.4, but - unless I'm wrong, it seems to do not work anymore. Could you please let me know how to solve it ?

ods rtf file = "C:\Users\test.rtf" ;

report data = sashelp.stocks headline headskip nowindows list split='£' formchar(2) ='_' missing spacing=1 style={rules=groups frame=hsides} contents="" ;

title1 " ";

ods proclabel="Titre table";

column ("Titre table" date open) ;

where stock='IBM' ;

run ;

rtf close ;

Thanks in advance for your help,

BR,

Violaine


Accepted Solutions
Solution
‎06-29-2015 11:41 AM
Super User
Posts: 11,144

Re: ToC with ODS RTF --> code previously worked with SAS 9.1.3 but not with SAS 9.4

Some of your code got eaten by the paste into the this forum. You may want to edit the post to include the missing bits.

Please describe how "it seems not to work". No RTF file generated? No TOC bits in the parts of the document? Missing when the document is combined?

Have you tried explicitly adding a toc_data option on the rtf statement? It looks like from the documentation that the default is NOTOC_data.

View solution in original post


All Replies
Solution
‎06-29-2015 11:41 AM
Super User
Posts: 11,144

Re: ToC with ODS RTF --> code previously worked with SAS 9.1.3 but not with SAS 9.4

Some of your code got eaten by the paste into the this forum. You may want to edit the post to include the missing bits.

Please describe how "it seems not to work". No RTF file generated? No TOC bits in the parts of the document? Missing when the document is combined?

Have you tried explicitly adding a toc_data option on the rtf statement? It looks like from the documentation that the default is NOTOC_data.

SAS Super FREQ
Posts: 8,820

Re: ToC with ODS RTF --> code previously worked with SAS 9.1.3 but not with SAS 9.4

Hi:

  BallardW is correct -- in earlier versions of SAS, you only needed to code CONTENTS=YES for ODS RTF. BUT, in SAS 9.4,  you also need to code TOC_DATA -- that happened between SAS 9.2 and 9.3, I believe.

cynthia

Contributor
Posts: 30

Re: ToC with ODS RTF --> code previously worked with SAS 9.1.3 but not with SAS 9.4

Thank you! The issue is solved.
BR,

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 658 views
  • 3 likes
  • 3 in conversation