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,
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.