<?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: Ods rtf: How to get the &amp;quot;table of contents&amp;quot; on the front page by using SAS 9.4? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307004#M17223</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;Not really sure why you are using your own RTF control strings. Typically, if you use TOC_DATA and CONTENTS=YES, with ODS RTF, the first page is a table of contents and the subsequent pages have the procedure output. Using TOC_DATA causes ODS to insert the appropriate text strings into the document.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although since you are also using STARTPAGE with the RTF control strings, I'm not entirely sure that this will work as you expect. I'd suggest opening a track with Tech Support.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2016 01:47:25 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2016-10-25T01:47:25Z</dc:date>
    <item>
      <title>Ods rtf: How to get the "table of contents" on the front page by using SAS 9.4?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/306830#M17219</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some trubble by creating a document (only table of contens on the front page) by using SAS 9.4. I got the following example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ODS ESCAPECHAR ='~';
ODS noproctitle; 
OPTIONS orientation=landscape PAPERSIZE="ISO A4" NOdate NOnumber NOQUOTELENMAX center pageno=1;
ODS RTF nobodytitle notoc_data startpage=no;
title1 j=l 'Project' j=r 'page ~{PAGEOF}'; 
title2 j=l 'Table of Contents';

	*to creat TOC;
	ods rtf text='~S={outputwidth=100% just=l}{\field{\*\fldinst {\\TOC \\f \\h} } \par }'; 

ods rtf startpage=now;

title2 j=l 'Analysis'; 
title3 j=l '1. Origin'; 
*Information to print in TOC;
ods rtf text="~S={outputwidth=100% just=l} {\tc\b\f3\fs0\cf8 Analysis}"; 
ods rtf text="~S={outputwidth=100% just=l} {\tc\b\f3\fs0\cf8 1. Origin}"; 

	PROC TABULATE data=sashelp.cars;
		class Origin;  
		table Origin,(N pctn='%'*F=4.1); 
	RUN;  

ods rtf startpage=now;

title3 j=l '2. DriveTrain'; 
ods rtf text="~S={outputwidth=100% just=l} {\tc\b\f3\fs0\cf8 2. DriveTrain}"; 

	PROC TABULATE data=sashelp.cars;
		class DriveTrain;  
		table DriveTrain,(N pctn='%'*F=4.1); 
	RUN;  

ods rtf close;&lt;/PRE&gt;&lt;P&gt;Using SAS 9.2 this code would create 3 pages:&lt;/P&gt;&lt;P&gt;p1 - Table of Contents&lt;BR /&gt;p2 - 1. Origin&lt;BR /&gt;p2 - 2. DriveTrain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you use SAS 9.4 there were just 2 pages. How can I get an extra page for the table of contents with SAS 9.4?&lt;/P&gt;&lt;P&gt;At the moment I handle the problem by creating a simple print-note:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	DATA TEXT;
		text="please delete";
	RUN;

	PROC PRINT DATA=TEXT;
		var text;
	RUN;&lt;/PRE&gt;&lt;P&gt;After creating the document you have to delete the note. This is an easy way for one document but not for a automatic report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 14:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/306830#M17219</guid>
      <dc:creator>SASUserMD</dc:creator>
      <dc:date>2016-10-24T14:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ods rtf: How to get the "table of contents" on the front page by using SAS 9.4?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/306873#M17221</link>
      <description>&lt;P&gt;Did you go to the document in Word or a similar program and attempt to use the program features to build the TOC? That information is in a field that you have to activate.&lt;/P&gt;
&lt;P&gt;Use the a "reveal codes" feature to see where that may be on the page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or possibly the behavior in the word processor has changed. Wouldn't be the first time that's happened.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 16:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/306873#M17221</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-24T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ods rtf: How to get the "table of contents" on the front page by using SAS 9.4?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307004#M17223</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;Not really sure why you are using your own RTF control strings. Typically, if you use TOC_DATA and CONTENTS=YES, with ODS RTF, the first page is a table of contents and the subsequent pages have the procedure output. Using TOC_DATA causes ODS to insert the appropriate text strings into the document.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although since you are also using STARTPAGE with the RTF control strings, I'm not entirely sure that this will work as you expect. I'd suggest opening a track with Tech Support.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 01:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307004#M17223</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-10-25T01:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ods rtf: How to get the "table of contents" on the front page by using SAS 9.4?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307037#M17224</link>
      <description>&lt;P&gt;I know, I have done this. TOC and the first table are now on the same page. But I want the first page with TOC only and afterwards the tables.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 06:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307037#M17224</guid>
      <dc:creator>SASUserMD</dc:creator>
      <dc:date>2016-10-25T06:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Ods rtf: How to get the "table of contents" on the front page by using SAS 9.4?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307038#M17225</link>
      <description>&lt;P&gt;Thanks. Yes you can also use TOC_DATA but I want all title-information's in the TOC. We are generating reports with serval titels. E.g.:&lt;/P&gt;&lt;P&gt;1. Titel1&lt;/P&gt;&lt;P&gt;1.1 Titel1.1&lt;/P&gt;&lt;P&gt;1.1.1 Titel1.1.1&lt;/P&gt;&lt;P&gt;Table&lt;/P&gt;&lt;P&gt;1.1.2 Titel1.1.2&lt;/P&gt;&lt;P&gt;Table&lt;/P&gt;&lt;P&gt;1.2 Titel1.2&lt;/P&gt;&lt;P&gt;1.1.1 Titel1.2.1&lt;/P&gt;&lt;P&gt;Table&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;And I want all these information's in the TOC. That's why I'm using this code: &lt;A href="http://www2.sas.com/proceedings/forum2008/238-2008.pdf" target="_self"&gt;www2.sas.com/proceedings/forum2008/238-2008.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS Support couldn't help me so far. Just send me serval links.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 06:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307038#M17225</guid>
      <dc:creator>SASUserMD</dc:creator>
      <dc:date>2016-10-25T06:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Ods rtf: How to get the "table of contents" on the front page by using SAS 9.4?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307047#M17226</link>
      <description>&lt;P&gt;I tried a different output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS ESCAPECHAR ='~';
ods rtf startpage=no notoc_data;
title1 j=l 'Project' j=r 'page ~{PAGEOF}'; 
title2 j=l 'Text on first page';

	ods rtf startpage=now;
	ods rtf text="Text on first page"; 

ods rtf startpage=now;

title2 j=l 'Analysis'; 
title3 j=l '1. Origin'; 

	PROC TABULATE data=sashelp.cars;
		class Origin;  
		table Origin,(N pctn='%'*F=4.1); 
	RUN;  

ods rtf startpage=now;

title3 j=l '2. DriveTrain'; 
ods rtf text="~S={outputwidth=100% just=l} {\tc\b\f3\fs0\cf8 2. DriveTrain}"; 

	ods rtf text="TEST"; 

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Problem is: You can't get a new page by using "ods rtf text" at the first page. But why? It's working fine at any other position in the document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 07:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Ods-rtf-How-to-get-the-quot-table-of-contents-quot-on-the-front/m-p/307047#M17226</guid>
      <dc:creator>SASUserMD</dc:creator>
      <dc:date>2016-10-25T07:30:34Z</dc:date>
    </item>
  </channel>
</rss>

