<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unable to create any TOC in RTF files in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647500#M24084</link>
    <description>&lt;P&gt;Having some difficulties.&amp;nbsp; Cannot seem to create a Table Of Contents at all on output to RTF and cannot see why.&amp;nbsp; So an example:&lt;/P&gt;
&lt;P&gt;Using SAS 9.4 1M2:&lt;/P&gt;
&lt;PRE&gt;ods rtf file="afile.rtf" contents toc_data;
title "First output";
proc print data=sashelp.class;
run;
title "Second output";
proc print data=sashelp.class;
run;
ods rtf close;&lt;/PRE&gt;
&lt;P&gt;This produces a file, first page is Table of Contents, blank.&amp;nbsp; Then the two outputs.&amp;nbsp; I have tried every which way I can think of but nothing creates a table of contents.&amp;nbsp; I have tried:&lt;/P&gt;
&lt;P&gt;ods text&lt;/P&gt;
&lt;P&gt;ods proclabel&lt;/P&gt;
&lt;P&gt;^r/rtf's1' with wordstyle='(\s1 Heading 1;)';&lt;/P&gt;
&lt;P&gt;I have tried with toc_data, notoc_data, keepn startpage options.&amp;nbsp; Tried with render procedure, within render procedure give it an object name.&amp;nbsp; Nothing seems to create a TOC when output to RTF.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the above code does work if it is pdf destination (albeit without links), not rtf.&amp;nbsp; I am at a loss as to why I cannot create RTF TOC's at all, am I missing some component needed for it?&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2020 15:27:45 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2020-05-13T15:27:45Z</dc:date>
    <item>
      <title>Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647500#M24084</link>
      <description>&lt;P&gt;Having some difficulties.&amp;nbsp; Cannot seem to create a Table Of Contents at all on output to RTF and cannot see why.&amp;nbsp; So an example:&lt;/P&gt;
&lt;P&gt;Using SAS 9.4 1M2:&lt;/P&gt;
&lt;PRE&gt;ods rtf file="afile.rtf" contents toc_data;
title "First output";
proc print data=sashelp.class;
run;
title "Second output";
proc print data=sashelp.class;
run;
ods rtf close;&lt;/PRE&gt;
&lt;P&gt;This produces a file, first page is Table of Contents, blank.&amp;nbsp; Then the two outputs.&amp;nbsp; I have tried every which way I can think of but nothing creates a table of contents.&amp;nbsp; I have tried:&lt;/P&gt;
&lt;P&gt;ods text&lt;/P&gt;
&lt;P&gt;ods proclabel&lt;/P&gt;
&lt;P&gt;^r/rtf's1' with wordstyle='(\s1 Heading 1;)';&lt;/P&gt;
&lt;P&gt;I have tried with toc_data, notoc_data, keepn startpage options.&amp;nbsp; Tried with render procedure, within render procedure give it an object name.&amp;nbsp; Nothing seems to create a TOC when output to RTF.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the above code does work if it is pdf destination (albeit without links), not rtf.&amp;nbsp; I am at a loss as to why I cannot create RTF TOC's at all, am I missing some component needed for it?&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 15:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647500#M24084</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2020-05-13T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647569#M24085</link>
      <description>Hi:&lt;BR /&gt;  In our classes we typically show how to do a right-click and then Update Field to make the Contents page populate in Word. You didn't way what word processing application you were working in. However, sometimes, in Word, it is hard to right click in the right place and find Update Field as a choice. So, there are 2 alternate methods you can use (in Word):&lt;BR /&gt;&lt;BR /&gt;1) Go to the Word ribbon and click on References and then in the Table of Contents section choose Update Table and that should update the Table of Contents (assuming you used the right options to create the Table of Contents field codes); &lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;2) When you are at the first page (showing the text Table of Contents), do a Ctrl+A to select the entire document and then click F9 to update the tables in the document.&lt;BR /&gt;&lt;BR /&gt;  Both of these methods work in Word 2016 to refresh the Table of Contents as an alternative to the right-click method  we show in our courses. Your code worked for me in SAS 9.4 M5 and 9.5M6. So, if none of that works for you, then I suggest opening a track with Tech Support.&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;BR /&gt;</description>
      <pubDate>Wed, 13 May 2020 18:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647569#M24085</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-05-13T18:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647590#M24086</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt; , thanks for your response.&amp;nbsp; I have tried these options.&amp;nbsp; Using Office16, it doesn't find any table of contents.&amp;nbsp; This is what is so bizarre.&amp;nbsp; It creates a page one, with title Table of Contents, but there is nothing on it.&amp;nbsp; Update table tells me there is no table of contents entries found.&lt;/P&gt;
&lt;P&gt;Just doesn't seem to be writing any TOC information when RTF destination is present, and yet switch it to PDF and TOC is there fine, and bookmarks.&amp;nbsp; Its like a component is missing for the RTF tagset.&amp;nbsp; I have also tried with:&lt;/P&gt;
&lt;P&gt;ods tagsets.rtf file=... options(contents='yes' data='yes');&lt;/P&gt;
&lt;P&gt;Again, no TOC.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 19:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647590#M24086</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2020-05-13T19:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647620#M24088</link>
      <description>&lt;P&gt;I ran your code and I do see a TOC collapsed in the RTF. It is just not as apparent as in the Results window where you clearly see a downward arrow. You have to right click by placing the cursor BELOW the Table of Contents area and choose Update field. Not a very desirable behavior but it is expected. For more on this see:&amp;nbsp;&lt;FONT&gt;&lt;A href="https://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p1vvsv8ucnjzjnn1wq5wrlp74mdb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0pg2tmkd9x2own1rsrokb83vcsy" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p1vvsv8ucnjzjnn1wq5wrlp74mdb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0pg2tmkd9x2own1rsrokb83vcsy&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See Example 1 and scroll a bit down to the end of the example.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 20:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647620#M24088</guid>
      <dc:creator>biopharma</dc:creator>
      <dc:date>2020-05-13T20:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647622#M24089</link>
      <description>&lt;P&gt;Oops. Looks like Cynthia has already posted a reply. I tried reloading the page to see if it was already answered but I didn't see any. Lo and behold when I posted the other replies appeared.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 20:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647622#M24089</guid>
      <dc:creator>biopharma</dc:creator>
      <dc:date>2020-05-13T20:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647649#M24090</link>
      <description>Hi:&lt;BR /&gt; I've tried the same code and got a Table of Contents. I think you need to work with Tech Support on why the code does not work for you. They'll need to look at all your code and your version info to figure out what might be wrong.&lt;BR /&gt;Cynthia</description>
      <pubDate>Wed, 13 May 2020 22:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647649#M24090</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-05-13T22:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to create any TOC in RTF files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647735#M24092</link>
      <description>&lt;P&gt;Thanks Cynthia, I thought it might come to that.&amp;nbsp; I will get hold of them at some point and go through it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 09:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Unable-to-create-any-TOC-in-RTF-files/m-p/647735#M24092</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2020-05-14T09:41:51Z</dc:date>
    </item>
  </channel>
</rss>

