<?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: Table of Contents in SAS in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247600#M15208</link>
    <description>Thanks for replying Cynthia. I do get TOC by using contents=yes option. Actually, what I meant was having a TOC with page number and customized titles, may be customized fonts and font size as well.</description>
    <pubDate>Tue, 02 Feb 2016 19:58:34 GMT</pubDate>
    <dc:creator>monikaarora</dc:creator>
    <dc:date>2016-02-02T19:58:34Z</dc:date>
    <item>
      <title>Table of Contents in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/238178#M14831</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to make a report in SAS. In the report I am making graphs using Proc gplot then exporting them to a pdf using ods pdf.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also want Table of Contents in the front of the page with title &amp;amp; page number of the graphs.&lt;/P&gt;&lt;P&gt;When I use proclabel I get the bookmarks but not a proper Table of Contents like we get from&amp;nbsp;word or any such&amp;nbsp;&amp;nbsp;software.&lt;/P&gt;&lt;P&gt;Does anyone know how can I get a proper TOC in the beginning of my report before the graphs are plotted?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;monika&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 21:49:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/238178#M14831</guid>
      <dc:creator>monikaarora</dc:creator>
      <dc:date>2015-12-07T21:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Table of Contents in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/238211#M14836</link>
      <description>Hi, &lt;BR /&gt;Generally, with ODS PDF, you get the separate TOC page by using the contents=yes option:&lt;BR /&gt;&lt;BR /&gt;ods pdf file='xxx.pdf' contents=yes;&lt;BR /&gt;** first proc;&lt;BR /&gt;** second proc;&lt;BR /&gt;** third proc;&lt;BR /&gt;ods pdf close;&lt;BR /&gt;&lt;BR /&gt;As long as one of your procedures is a SAS/GRAPH procedure "inside" the ODS "sandwich", then you should be getting a separate TOC page in the PDF document.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 08 Dec 2015 04:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/238211#M14836</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-12-08T04:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table of Contents in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/238235#M14839</link>
      <description>&lt;P&gt;Might want to clarify what is meant by "proper TOC" from Word as I have had this a lot over the years, things like page numbering, links to pages and such like is just very difficult in SAS. &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 09:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/238235#M14839</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-12-08T09:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Table of Contents in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247600#M15208</link>
      <description>Thanks for replying Cynthia. I do get TOC by using contents=yes option. Actually, what I meant was having a TOC with page number and customized titles, may be customized fonts and font size as well.</description>
      <pubDate>Tue, 02 Feb 2016 19:58:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247600#M15208</guid>
      <dc:creator>monikaarora</dc:creator>
      <dc:date>2016-02-02T19:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Table of Contents in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247602#M15209</link>
      <description>Thanks for writing RW9. Yes, I am looking for page numbering, customized titles, and may be customized fonts and font size as well.</description>
      <pubDate>Tue, 02 Feb 2016 20:01:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247602#M15209</guid>
      <dc:creator>monikaarora</dc:creator>
      <dc:date>2016-02-02T20:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Table of Contents in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247682#M15212</link>
      <description>&lt;P&gt;Well, Cynthia is the SAS ODS expert, so I will just talk from my experience. &amp;nbsp;I would personally do it this way. &amp;nbsp;Output all files to RTF - in my industry it is standard to provide individual files anyway. &amp;nbsp;Once you have these files combine them in word and add the TOC there, its pretty straightforward and even manually doesn't take more than a few minutes. &amp;nbsp;Thn that whole file can be printed to PDF. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creating a PDF directly from SAS which has links, relevant page numbers and such like is a real pain. &amp;nbsp;I have tried it several times with not great results. &amp;nbsp;Below is an example of where I had got to on this, as you can see I get links and can change fonts and what not, but you will need to calculate page numbers and things before and add them in. &amp;nbsp;Total faff, thats why I recommend going through Word so you can use ^{thispage} of ^{lastpage} and let Word do all that for you.&lt;/P&gt;
&lt;PRE&gt;ods document name=work.full_print (write);
ods noproctitle;
data work.cars;
	set sashelp.cars;
	flag=1;
run;
data work.class;
	set sashelp.class;
	flag=1;
run;
data work.x;
	attrib tct format=$200. ;
	flag=1;
	tct="^S={just=left vjust=middle cellheight=20pt font_size=10pt cellwidth=15cm linkcolor=white url='#rep1'} My link to cars section ^{thispage}"; output;
	tct="^S={just=left vjust=middle cellheight=20pt font_size=10pt cellwidth=15cm linkcolor=white url='#rep2'} My link to class section ^{thispage}"; output;
run;

title;
footnote;

proc report data=work.x nowd contents="" split='~' ls=256 ps=207 list missing
						style(column) = {font_size=6pt background=white just=l borderrightcolor=white borderleftcolor=white
                           				 bordertopcolor=white borderbottomcolor=white linkcolor=white}
						style(header) = {font_size=6pt background=white just=c borderrightcolor=white borderleftcolor=white
                           				 bordertopcolor=white borderbottomcolor=white linkcolor=white};
	column flag tct;
	define tct / "Table of Contents" style={font_size=10pt just=c background=white borderrightcolor=white borderleftcolor=white
                           				      bordertopcolor=white borderbottomcolor=white linkcolor=white};
	define flag / noprint order;
	break before flag / page contents='';
run;

title j=c "Cars";
proc report data=work.cars nowd contents="";
	define flag / noprint order;
	break before flag / page contents='';
run;
title j=c "Class";
proc report data=work.class nowd contents="";
	define flag / noprint order;
	break before flag / page contents='';
run;
ods document close;

ods pdf file="S:\Temp\Rob\Content.pdf";
proc document name=work.full_print;
	list/levels=all; run;
quit;
ods pdf close;

ods pdf file="S:\Temp\Rob\Content2.pdf" /*contents=yes*/;
proc document name=work.full_print (update);
	ods escapechar="^";
	setlabel Report#1 "Table of Contents";
	setlabel Report#2 "Cars"; run;
	setlabel Report#3 "Class"; run;
	ods pdf anchor="toc"; 
	replay Report#1; run; 
	ods pdf anchor="rep1";
	replay Report#2; run;
	ods pdf anchor="rep2";
	replay Report#3; run;
quit;
ods pdf close;


	
&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Feb 2016 09:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Table-of-Contents-in-SAS/m-p/247682#M15212</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-03T09:39:15Z</dc:date>
    </item>
  </channel>
</rss>

