BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hetuvio
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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

3 REPLIES 3
ballardw
Super User

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.

Cynthia_sas
SAS Super FREQ

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

hetuvio
Calcite | Level 5

Thank you! The issue is solved.
BR,

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 3 replies
  • 1402 views
  • 3 likes
  • 3 in conversation