<?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: PROC REPORT &amp; More Control of TOC in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/662#M316</link>
    <description>In theory you should be able to do this with a combination of RBREAK BEFORE /PAGE and the CONTENTS= option. However, CONTENTS= is pretty much broken in 9.1.3. Tech. Support and I have been discussing how PROC REPORT &lt;I&gt;should&lt;/I&gt; handle TOC entries and I hope to give it some useful behavior in 9.2.</description>
    <pubDate>Thu, 18 May 2006 14:49:50 GMT</pubDate>
    <dc:creator>Tim_SAS</dc:creator>
    <dc:date>2006-05-18T14:49:50Z</dc:date>
    <item>
      <title>PROC REPORT &amp; More Control of TOC</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/661#M315</link>
      <description>I have a detailed PROC REPORT and would like to see if I can better control of the TOC.  &lt;BR /&gt;
&lt;BR /&gt;
I've found the ODS PROCLABEL, which is on the right track, but not detailed enough for my needs.&lt;BR /&gt;
&lt;BR /&gt;
I'm using an RBREAK for a classification variable, and I'd like to have each RBREAK produce a TOC entry.  Is it possible and has it been documented anywhere?&lt;BR /&gt;
&lt;BR /&gt;
TIA,&lt;BR /&gt;
Kim LeBouton</description>
      <pubDate>Wed, 17 May 2006 21:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/661#M315</guid>
      <dc:creator>KimLeBouton</dc:creator>
      <dc:date>2006-05-17T21:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT &amp; More Control of TOC</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/662#M316</link>
      <description>In theory you should be able to do this with a combination of RBREAK BEFORE /PAGE and the CONTENTS= option. However, CONTENTS= is pretty much broken in 9.1.3. Tech. Support and I have been discussing how PROC REPORT &lt;I&gt;should&lt;/I&gt; handle TOC entries and I hope to give it some useful behavior in 9.2.</description>
      <pubDate>Thu, 18 May 2006 14:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/662#M316</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2006-05-18T14:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT &amp; More Control of TOC</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/663#M317</link>
      <description>Theoretically, you could also wrap your PROC REPORT into a SAS macro program and then use ODS PROCLABEL for the group being passed to the macro. So, each run of the macro program would put an entry into the TOC. This is a workaround but might work, depending on the other requirements of your PROC REPORT process.</description>
      <pubDate>Wed, 24 May 2006 01:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/663#M317</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2006-05-24T01:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT &amp; More Control of TOC</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/664#M318</link>
      <description>Here's a sample of the basic macro program. Playing with PROCLABEL and/or CONTENTS= you can sort of control or eliminate items in the TOC, but as somebody said, it is a kind of hit and miss affair (eliminating ODS PROCLABEL gives you an index number, with a line feed and the region on the next line; while eliminating the CONTENTS= will give you the PROCLABEL line, but no hyperlink to the section of the report associated with the region.)  &lt;BR /&gt;
&lt;BR /&gt;
In most instances, I would recommend PROC DOCUMENT/ODS DOCUMENT for rearranging your output objects and your TOC on replay, but PROC REPORT does not play nice with ODS DOCUMENT (or vice versa).&lt;BR /&gt;
&lt;BR /&gt;
There are some style template things you can also do to streamline the TOC (playing with IndexItem, etc).&lt;BR /&gt;
&lt;BR /&gt;
Another alternative is to replace the SAS-generated TOC file with your own TOC/Frame file if you're doing HTML. If you're doing RTF, I think some folks use RTF control strings to insert TOC info into the RTF file for TOC generation.&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
*** code;&lt;BR /&gt;
%macro doreg(sreg=);&lt;BR /&gt;
ods proclabel "PROCLABEL: &amp;amp;sreg";&lt;BR /&gt;
proc report data=sashelp.shoes nowd&lt;BR /&gt;
     contents="Contents= &amp;amp;sreg";&lt;BR /&gt;
where region = "&amp;amp;sreg";&lt;BR /&gt;
title "Report for &amp;amp;sreg";&lt;BR /&gt;
column subsidiary product sales;r&lt;BR /&gt;
define subsidiary /group;&lt;BR /&gt;
define product /group;&lt;BR /&gt;
define sales /sum;&lt;BR /&gt;
rbreak after /summarize;&lt;BR /&gt;
run;&lt;BR /&gt;
%mend doreg;&lt;BR /&gt;
                                   &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html path='c:\temp' (url=none)&lt;BR /&gt;
    file='k_bod.html'&lt;BR /&gt;
	frame='k_frm.html'&lt;BR /&gt;
	contents='k_toc.html'&lt;BR /&gt;
	style=sasweb;&lt;BR /&gt;
&lt;BR /&gt;
	%doreg(sreg=Africa);&lt;BR /&gt;
	%doreg(sreg=Canada);&lt;BR /&gt;
        %doreg(sreg=Pacific);&lt;BR /&gt;
&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 24 May 2006 13:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-REPORT-More-Control-of-TOC/m-p/664#M318</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2006-05-24T13:03:25Z</dc:date>
    </item>
  </channel>
</rss>

