<?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 Selecting nodes displayed in TOC when using the page option in proc report (RTF) in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Selecting-nodes-displayed-in-TOC-when-using-the-page-option-in/m-p/517218#M3299</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been having an issue with controlling the nodes present in the TOC of SAS to RTF output. Specifically, for each table in my output I would only like 1 line in the TOC. I have read the discussion boards and I have&amp;nbsp;tried&amp;nbsp;using the contents = " " (quote-space-quote) or contents = "' (quote-quote) in the proc report statement as well as using ods proclabel. Please refer to the sample code below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The TOC I am currently getting has 4 nodes in total. The first node is what I have set in the ods proclabel statement (i.e. "TABLE 1"). The second node is "Report". The third node is "dummy--col25" and the fourth node is "dummy-col35". Please refer to the photo below. I am not sure why I am getting the second node when I have set contents = " " and used ods proclabel. I believe I am getting node 3 and 4 because of the page option in the define statement for column col31 but I do not know how to suppress this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rtf_issue.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25261i39D61402C4A2EAE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="rtf_issue.PNG" alt="rtf_issue.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: I am using the page option in the define statement for column col31 because I want col31-col35 to appear on a separate page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate nonumber nobyline;
ods listing close;
ods noresults;
ods proclabel = "TABLE 1";
ods escapechar = "~"; 
title; footnote;

title1 font = Calibri height = 10pt bold j = left "Title1";
title2 font = Calibri height = 10pt bold j = left "Title2" ;
title3 font = Calibri height = 10pt bold j = left "Title3" j = right "Title3.5";

footnote1 "~R'\brdrb\brdrs\brdrw8'";
footnote2 "Footnote1";
footnote3 "Footnote2";
footnote4 "Footnote3";
footnote5 "ProgramName" font = Calibri height = 10pt bold j = right "Page ~{thispage} of ~{lastpage}";

proc report data=dataset headline headskip nocenter missing split='`' nowindows contents=""; 
column ("~R'\brdrb\brdrs\brdrw8'" dummy neword num high_num1 sum_high var1 para 
("Col 1`(N=%eval(&amp;amp;one))" "~R'\brdrb\brdrs\brdrw8'" col11 col12 col13 col14 col15)
("Col 2`(N=%eval(&amp;amp;two))" "~R'\brdrb\brdrs\brdrw8'" col21 col22 col23 col24 col25) 
("Col 3`(N=%eval(&amp;amp;three))" "~R'\brdrb\brdrs\brdrw8'" col31 col32 col33 col34 col35));

define dummy / order noprint;
define neword / order order=internal noprint;
define num / order order=internal noprint;
define high_num1 / order order=internal descending noprint;
define sum_high / order order=internal descending noprint;
define var1 / order order=internal noprint;

define para / id order order=internal flow left "~R'\ql' Column Header" style(column)={cellwidth=33.5%};

define col11 / display center "~R'\qc' SubCol1" style(column)={cellwidth=6.5%};
define col12/ display center "~R'\qc' SubCol2" style(column)={cellwidth=6.5%};
define col13 / display center "~R'\qc' SubCol3" style(column)={cellwidth=6.5%}; 
define col14 / display center "~R'\qc' SubCol4" style(column)={cellwidth=6.5%};
define col15 / display center "~R'\qc' SubCol5" style(column)={cellwidth=6.5%};

define col21 / display center "~R'\qc' SubCol1" style(column)={cellwidth=6.5%};
define col22 / display center "~R'\qc' SubCol2" style(column)={cellwidth=6.5%};
define col23 / display center "~R'\qc' SubCol3" style(column)={cellwidth=6.5%}; 
define col24 / display center "~R'\qc' SubCol4" style(column)={cellwidth=6.5%};
define col25 / display center "~R'\qc' SubCol5" style(column)={cellwidth=6.5%};

define col31 / display center "~R'\qc' SubCol1" style(column)={cellwidth=13%} contents = "" page;
define col32 / display center "~R'\qc' SubCol2" style(column)={cellwidth=13%};
define col33 / display center "~R'\qc' SubCol3" style(column)={cellwidth=13%}; 
define col34 / display center "~R'\qc' SubCol4" style(column)={cellwidth=13%};
define col35 / display center "~R'\qc' SubCol5" style(column)={cellwidth=13%};

break after neword / ol summarize suppress skip;

break before dummy / contents="" page;
compute before _page_ ;

line "~S={just=c font=(Calibri) font_weight=bold}TABLE 1";
line "~S={just=c font=(Calibri) font_weight=bold}Title2";

endcomp ;
run;

ods tagsets.rtf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using SAS 9.4&lt;/P&gt;</description>
    <pubDate>Thu, 29 Nov 2018 20:08:13 GMT</pubDate>
    <dc:creator>cichonje</dc:creator>
    <dc:date>2018-11-29T20:08:13Z</dc:date>
    <item>
      <title>Selecting nodes displayed in TOC when using the page option in proc report (RTF)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-nodes-displayed-in-TOC-when-using-the-page-option-in/m-p/517218#M3299</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been having an issue with controlling the nodes present in the TOC of SAS to RTF output. Specifically, for each table in my output I would only like 1 line in the TOC. I have read the discussion boards and I have&amp;nbsp;tried&amp;nbsp;using the contents = " " (quote-space-quote) or contents = "' (quote-quote) in the proc report statement as well as using ods proclabel. Please refer to the sample code below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The TOC I am currently getting has 4 nodes in total. The first node is what I have set in the ods proclabel statement (i.e. "TABLE 1"). The second node is "Report". The third node is "dummy--col25" and the fourth node is "dummy-col35". Please refer to the photo below. I am not sure why I am getting the second node when I have set contents = " " and used ods proclabel. I believe I am getting node 3 and 4 because of the page option in the define statement for column col31 but I do not know how to suppress this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rtf_issue.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25261i39D61402C4A2EAE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="rtf_issue.PNG" alt="rtf_issue.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: I am using the page option in the define statement for column col31 because I want col31-col35 to appear on a separate page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate nonumber nobyline;
ods listing close;
ods noresults;
ods proclabel = "TABLE 1";
ods escapechar = "~"; 
title; footnote;

title1 font = Calibri height = 10pt bold j = left "Title1";
title2 font = Calibri height = 10pt bold j = left "Title2" ;
title3 font = Calibri height = 10pt bold j = left "Title3" j = right "Title3.5";

footnote1 "~R'\brdrb\brdrs\brdrw8'";
footnote2 "Footnote1";
footnote3 "Footnote2";
footnote4 "Footnote3";
footnote5 "ProgramName" font = Calibri height = 10pt bold j = right "Page ~{thispage} of ~{lastpage}";

proc report data=dataset headline headskip nocenter missing split='`' nowindows contents=""; 
column ("~R'\brdrb\brdrs\brdrw8'" dummy neword num high_num1 sum_high var1 para 
("Col 1`(N=%eval(&amp;amp;one))" "~R'\brdrb\brdrs\brdrw8'" col11 col12 col13 col14 col15)
("Col 2`(N=%eval(&amp;amp;two))" "~R'\brdrb\brdrs\brdrw8'" col21 col22 col23 col24 col25) 
("Col 3`(N=%eval(&amp;amp;three))" "~R'\brdrb\brdrs\brdrw8'" col31 col32 col33 col34 col35));

define dummy / order noprint;
define neword / order order=internal noprint;
define num / order order=internal noprint;
define high_num1 / order order=internal descending noprint;
define sum_high / order order=internal descending noprint;
define var1 / order order=internal noprint;

define para / id order order=internal flow left "~R'\ql' Column Header" style(column)={cellwidth=33.5%};

define col11 / display center "~R'\qc' SubCol1" style(column)={cellwidth=6.5%};
define col12/ display center "~R'\qc' SubCol2" style(column)={cellwidth=6.5%};
define col13 / display center "~R'\qc' SubCol3" style(column)={cellwidth=6.5%}; 
define col14 / display center "~R'\qc' SubCol4" style(column)={cellwidth=6.5%};
define col15 / display center "~R'\qc' SubCol5" style(column)={cellwidth=6.5%};

define col21 / display center "~R'\qc' SubCol1" style(column)={cellwidth=6.5%};
define col22 / display center "~R'\qc' SubCol2" style(column)={cellwidth=6.5%};
define col23 / display center "~R'\qc' SubCol3" style(column)={cellwidth=6.5%}; 
define col24 / display center "~R'\qc' SubCol4" style(column)={cellwidth=6.5%};
define col25 / display center "~R'\qc' SubCol5" style(column)={cellwidth=6.5%};

define col31 / display center "~R'\qc' SubCol1" style(column)={cellwidth=13%} contents = "" page;
define col32 / display center "~R'\qc' SubCol2" style(column)={cellwidth=13%};
define col33 / display center "~R'\qc' SubCol3" style(column)={cellwidth=13%}; 
define col34 / display center "~R'\qc' SubCol4" style(column)={cellwidth=13%};
define col35 / display center "~R'\qc' SubCol5" style(column)={cellwidth=13%};

break after neword / ol summarize suppress skip;

break before dummy / contents="" page;
compute before _page_ ;

line "~S={just=c font=(Calibri) font_weight=bold}TABLE 1";
line "~S={just=c font=(Calibri) font_weight=bold}Title2";

endcomp ;
run;

ods tagsets.rtf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using SAS 9.4&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 20:08:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-nodes-displayed-in-TOC-when-using-the-page-option-in/m-p/517218#M3299</guid>
      <dc:creator>cichonje</dc:creator>
      <dc:date>2018-11-29T20:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting nodes displayed in TOC when using the page option in proc report (RTF)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Selecting-nodes-displayed-in-TOC-when-using-the-page-option-in/m-p/517328#M3314</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;&amp;nbsp; You haven't provided any data or shown your ODS TAGSETS.RTF opening statement. In addition, you don't show what the values of the dummy variable are set to.&lt;BR /&gt;&amp;nbsp; You might want to work with Tech Support on this. I'm not entirely sure that your 'old style' ~S and ~R escapechar controls will work with TAGSETS.RTF the way you want in 9.4. If that's working, then good, but otherwise, without data, nobody can run your code.&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 01:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Selecting-nodes-displayed-in-TOC-when-using-the-page-option-in/m-p/517328#M3314</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-11-30T01:46:15Z</dc:date>
    </item>
  </channel>
</rss>

