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
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.
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.
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
Thank you! The issue is solved.
BR,
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.