<?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 Re: TOC creation in ODS RTF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51670#M6547</link>
    <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
Thank you vey much its seems this idea will work i will try this way. &lt;BR /&gt;
&lt;BR /&gt;
Thank once again for all.&lt;BR /&gt;
&lt;BR /&gt;
sudhakar</description>
    <pubDate>Fri, 10 Jul 2009 13:24:39 GMT</pubDate>
    <dc:creator>Sudhakar_A</dc:creator>
    <dc:date>2009-07-10T13:24:39Z</dc:date>
    <item>
      <title>TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51664#M6541</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have RTF output created by SAS ODS, Is there any way to append all the RTF outputs and Create a Table Of Content for this appended document.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Sudhakar</description>
      <pubDate>Mon, 06 Jul 2009 13:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51664#M6541</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2009-07-06T13:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51665#M6542</link>
      <description>Hi:&lt;BR /&gt;
  If you put all your steps into 1 ODS RTF "sandwich", then all the tables would be together in one RTF document -- with 1 table of contents. Something along these lines:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods rtf file='somefile.rtf' contents=yes toc_data;&lt;BR /&gt;
*** proc or data step 1;&lt;BR /&gt;
        &lt;BR /&gt;
*** proc or data step 2;&lt;BR /&gt;
                         &lt;BR /&gt;
*** proc or data step 3;&lt;BR /&gt;
run;&lt;BR /&gt;
ods rtf close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
As explained in this Tech Support note&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/034.html" target="_blank"&gt;http://support.sas.com/kb/24/034.html&lt;/A&gt;&lt;BR /&gt;
you cannot append RTF files together using SAS. &lt;BR /&gt;
         &lt;BR /&gt;
The only ways to assemble multiple RTF files together are:&lt;BR /&gt;
1) put all your SAS code within one ODS RTF "sandwich" -- so that the parts/sections of your document are built by SAS from multiple procedures.&lt;BR /&gt;
2) assemble your multiple RTF files in Microsoft Word or some other Word processor (possibly using VBScript or a Word macro)&lt;BR /&gt;
3) post-process the RTF files with a program to selectively remove the RTF control characters that define either the beginning or end of a file.&lt;BR /&gt;
 &lt;BR /&gt;
There have been other forum postings on this topic:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=5513ᖉ" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=5513ᖉ&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=6434ᤢ" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=6434ᤢ&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=14026㛊" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=14026㛊&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 06 Jul 2009 16:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51665#M6542</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-07-06T16:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51666#M6543</link>
      <description>Thank you very much. I will explain my situation &lt;BR /&gt;
&lt;BR /&gt;
1. Output1.rtf generated by User1&lt;BR /&gt;
2. Output2.rtf generated by user2&lt;BR /&gt;
&lt;BR /&gt;
So One output is independent of each other so after all the outputs are generated we have to append these outputs and also to create a TOC&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Mon, 06 Jul 2009 17:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51666#M6543</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2009-07-06T17:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51667#M6544</link>
      <description>Hi:&lt;BR /&gt;
  So, the #1 workaround, as explained above will not work for you. That leaves only #2 (do something in Word to assemble the files and build the TOC) or #3 post-process the RTF file with a program.&lt;BR /&gt;
 &lt;BR /&gt;
  Your only other alternative (depending on what procedures you are using for each report table) might be to create an ODS DOCUMENT store and then assemble the final document using ODS DOCUMENT and PROC DOCUMENT statements. But that means you would create the ODS DOCUMENT store -instead of- the RTF files from user1 and user2. Then your final RTF file would be built from these document objects, not from existing RTF files. For an overview of ODS DOCUMENT capabilities, refer to these papers or the ODS DOCUMENT documentation:&lt;BR /&gt;
&lt;A href="http://support.sas.com/resources/papers/sgf09/318-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/sgf09/318-2009.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.lexjansen.com/wuss/2003/DataPresentation/i-peek_at_proc_document.pdf" target="_blank"&gt;http://www.lexjansen.com/wuss/2003/DataPresentation/i-peek_at_proc_document.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 06 Jul 2009 17:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51667#M6544</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-07-06T17:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51668#M6545</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
It was a good idea to make this happen, i read this document and when i was trying to use this i got the warning "WARNING: PROC REPORT does not support the ODS Document in this release." &lt;BR /&gt;
&lt;BR /&gt;
Thanks for the help.&lt;BR /&gt;
&lt;BR /&gt;
Sudhakar</description>
      <pubDate>Mon, 06 Jul 2009 17:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51668#M6545</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2009-07-06T17:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51669#M6546</link>
      <description>I think the way to generate your TOC from separately created RTF would be by using the RTF field codes using RTF TEXT.&lt;BR /&gt;
&lt;BR /&gt;
Place this code in document portion and position that you want the TOC to appear:&lt;BR /&gt;
ODS RTF TEXT="{\field{\*\fldinst {\\TOC \\f \\h} } }";&lt;BR /&gt;
to insert the field code for a table of contents that will also create hyperlinks to the entries.&lt;BR /&gt;
&lt;BR /&gt;
Before each item in your report insert at table of contents entry code using:&lt;BR /&gt;
ods rtf text= " {\tc \tcl&lt;LEVEL&gt; &lt;YOUR text="" here=""&gt;}";&lt;BR /&gt;
&lt;BR /&gt;
The &lt;LEVEL&gt; is used to create indent levels when desired, use 2 or greater such as \tcl2. If you just have \tc then all items will be at the main level of the TOC.&lt;BR /&gt;
&lt;BR /&gt;
Style elements can be used to modify the text by placing the style descriptors before the {.  The text will also appear in the body of your document using the styles but the TOC settings for the document will control appearance in the TOC.&lt;BR /&gt;
&lt;BR /&gt;
After all of the document sections are merged, I assume using Word, then find the TOC field and do the Update all entries to display the table. I found it a bit difficult to find the field as there isn't anything visible but if you place it on an empty page near the start of the document you should be okay.&lt;BR /&gt;
&lt;BR /&gt;
Note that this does not use any of the SAS procedure TOC entry behaviors so individual tables to not get entries, just what you supply. &lt;BR /&gt;
&lt;BR /&gt;
DO NOT use the highlight all and menu item to insert a table of contents as you will create a separate TOC entry.&lt;BR /&gt;
&lt;BR /&gt;
I hope this helps.&lt;/LEVEL&gt;&lt;/YOUR&gt;&lt;/LEVEL&gt;</description>
      <pubDate>Wed, 08 Jul 2009 21:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51669#M6546</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2009-07-08T21:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51670#M6547</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
Thank you vey much its seems this idea will work i will try this way. &lt;BR /&gt;
&lt;BR /&gt;
Thank once again for all.&lt;BR /&gt;
&lt;BR /&gt;
sudhakar</description>
      <pubDate>Fri, 10 Jul 2009 13:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51670#M6547</guid>
      <dc:creator>Sudhakar_A</dc:creator>
      <dc:date>2009-07-10T13:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51671#M6548</link>
      <description>I forgot to mention that you will need to use a style that has PROTECTSPECIALCHARACTERS=OFF set.&lt;BR /&gt;
&lt;BR /&gt;
I believe this is mentioned in &lt;A href="http://support.sas.com/resources/papers/sgf09/318-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/sgf09/318-2009.pdf&lt;/A&gt;</description>
      <pubDate>Fri, 10 Jul 2009 21:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51671#M6548</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2009-07-10T21:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51672#M6549</link>
      <description>Hi:&lt;BR /&gt;
  I don't remember PROTECTSPECIALCHARS in that paper! But look on page 8 of this paper:&lt;BR /&gt;
&lt;A href="http://www.nesug.org/proceedings/nesug06/io/io13.pdf" target="_blank"&gt;http://www.nesug.org/proceedings/nesug06/io/io13.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
...it talks about all the various methods of creating and customizing a Table of Contents specifically for the RTF destination.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 10 Jul 2009 21:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/51672#M6549</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-07-10T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: TOC creation in ODS RTF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/229935#M14485</link>
      <description>I kept getting an error that Word could not understand my formatting. I realized that it is "\TCL" and not "TC1" after nearly pulling my hair out.</description>
      <pubDate>Wed, 14 Oct 2015 16:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/TOC-creation-in-ODS-RTF/m-p/229935#M14485</guid>
      <dc:creator>TriciaAanderud</dc:creator>
      <dc:date>2015-10-14T16:39:37Z</dc:date>
    </item>
  </channel>
</rss>

