<?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: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/766022#M25293</link>
    <description>If I was right. You are using BODYTITLE option.&lt;BR /&gt;&lt;BR /&gt;ods rtf file="c:\temp\Smoking.rtf" bodytitle;&lt;BR /&gt;&lt;BR /&gt;Try to delete it and using ODS TEXT='xxxxxxx' to replace title .</description>
    <pubDate>Sat, 04 Sep 2021 10:45:13 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-09-04T10:45:13Z</dc:date>
    <item>
      <title>In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765697#M25284</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PROC REPORT and ODS RTF to make a summary table. The table is a bit long and spans two pages on the RTF file. I want the table header to only appear on the first page and not the second page, and was wondering if there is a way to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that Microsoft Word has an option to enable/disable "Repeat Header Rows" in the "Layout" tab, which is exactly what I need to disable in order to have the table header only appear on the first page. Does ODS RTF or PROC REPORT have a way to disable this "Repeat Header Rows" option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is some sample SAS code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods rtf file="Smoking.rtf";&lt;/P&gt;&lt;P&gt;proc report data=sashelp.heart(obs=90) nowd&lt;/P&gt;&lt;P&gt;style(report) = {cellpadding = 1.25pt cellspacing = 2pt frame = hsides rules = groups just=center};&lt;/P&gt;&lt;P&gt;column smoking;&lt;/P&gt;&lt;P&gt;define smoking/ display order=data;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would want to remove the "Smoking" header on the second page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help or tips!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 19:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765697#M25284</guid>
      <dc:creator>ble9245</dc:creator>
      <dc:date>2021-09-02T19:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765761#M25285</link>
      <description>Hi:&lt;BR /&gt;  There's not a way to suppress the headers for the second page the way you envision with PROC REPORT syntax. However, I note that when I open a multipage ODS RTF result file with Word, I can click the Layout tab in Word and suppress the Headers on page 2 and other pages.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 02 Sep 2021 22:11:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765761#M25285</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-09-02T22:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765851#M25286</link>
      <description>&lt;P&gt;There is a workaround way. But you would not like it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods rtf file="c:\temp\Smoking.rtf";

proc report data=sashelp.heart(obs=45) nowd
style(report) = {cellpadding = 1.25pt cellspacing = 2pt frame = hsides rules = groups just=center};
column smoking;
define smoking/ display order=data;
run;

proc report data=sashelp.heart(firstobs=46 obs=90) nowd noheader
style(report) = {cellpadding = 1.25pt cellspacing = 2pt frame = hsides rules = groups just=center};
column smoking;
define smoking/ display order=data;
run;
ods rtf close;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Sep 2021 13:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765851#M25286</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-03T13:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765853#M25287</link>
      <description>Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;. That is the only way to suppress the headers on page 2 and all subsequent pages. It is the same method you need to use if you want a title on page 1, but not on any of the other pages. Given that it is much easier to turn the headers off in Word, that's what I'd recommend.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 03 Sep 2021 13:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765853#M25287</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-09-03T13:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765864#M25288</link>
      <description>&lt;P&gt;Ha Cynthia, It is so interesting . Once I used "ods text=" , and Header of second page is disappeared .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods rtf file="c:\temp\Smoking.rtf";
ods text='  ';
proc report data=sashelp.heart(obs=90) nowd
style(report) = {cellpadding = 1.25pt cellspacing = 2pt frame = hsides rules = groups just=center};
column smoking;
define smoking/ display order=data;
run;

ods rtf close;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Sep 2021 13:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765864#M25288</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-03T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765890#M25289</link>
      <description>Hi:&lt;BR /&gt;  If you change the statement to ODS RTF TEXT= (which is what you should do to change the RTF file), then it doesn't work anymore. I think this is a loophole that might not always work. Something to check with Tech Support I do not think this is the intended ODS RTF behavior with PROC REPORT.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 03 Sep 2021 16:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765890#M25289</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-09-03T16:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765968#M25290</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your response and help with this. Turning the headers off in Word is the easiest and most reliable solution for me. If I do somehow find a way to suppress the header on the next page(s), I'll be sure to update my post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 23:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765968#M25290</guid>
      <dc:creator>ble9245</dc:creator>
      <dc:date>2021-09-03T23:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765970#M25292</link>
      <description>Hi Ksharp,&lt;BR /&gt;&lt;BR /&gt;An interesting solution/workaround you found! It works like you mentioned for this simple PROC REPORT, but it didn't work for me when I tried it on the PROC REPORT code I have. It caused my title to duplicate and the header on the second page was still there &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks anyways!</description>
      <pubDate>Fri, 03 Sep 2021 23:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/765970#M25292</guid>
      <dc:creator>ble9245</dc:creator>
      <dc:date>2021-09-03T23:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/766022#M25293</link>
      <description>If I was right. You are using BODYTITLE option.&lt;BR /&gt;&lt;BR /&gt;ods rtf file="c:\temp\Smoking.rtf" bodytitle;&lt;BR /&gt;&lt;BR /&gt;Try to delete it and using ODS TEXT='xxxxxxx' to replace title .</description>
      <pubDate>Sat, 04 Sep 2021 10:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/766022#M25293</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-04T10:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/772021#M25327</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/396004"&gt;@ble9245&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/396004"&gt;@ble9245&lt;/a&gt;&amp;nbsp;'s question, even though I don't really understand why would anyone want a listing with only one header on the first page.&amp;nbsp; This would be the most simple SAS programing for that type of listing/table.&amp;nbsp; &amp;nbsp;SAS ODS RTF/Proc REPORT goes beyond that.&amp;nbsp; It would assume one would like to have a table/listing with headers on every page, even though they can put a simple option for your request.&amp;nbsp; &amp;nbsp;I don't really know if such option exists.&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;is pretty good at this, and she would have told us such option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;'s solution to use ODS TEXT=' ' was a success story by mistake:&amp;nbsp; SAS ODS RTF planned a perfect listing/table with headers on every page, by using a control word \trhdr.&amp;nbsp; But this control word works only in correct environment.&amp;nbsp; ODS TEXT= was poorly implemented in ODS, after it's done what it was supposed to do, it didn't provide a clean up to reset to the default paragraph property.&amp;nbsp; ODS RTF TEXT= is the correct one to use, as Cynthia pointed out, by providing a control word \pard and a new empty row.&amp;nbsp; So, if you compare the results of using ODS TEXT and ODS RTF TEXT, you will see that there is no space between the line by ODS TEXT=' ' and the line of 'Smoking', while there is an empty row between the line by ODS RTF TEXT='' and the line of 'Smoking', plus a control word \pard, which resets to default paragraph property, by Microsoft RTF specification.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have to write some SAS programing for this listing, it would be something like this one:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _null_; set sashelp.heart(obs=90)  end=eof; 
file '~/Smoke.rtf'; 
if _n_=1 then do; %nt(0, w=6.5, o=p); 
&amp;amp;b_header; 
%nt(1, w=6.5); 
put &amp;amp;br "Page: \chpgn  of {\field{\*\fldinst  NUMPAGES }}" &amp;amp;e;
&amp;amp;e_header; 
%nt(1, s=40 40, h=1, w=6.5, hd=1, last=1); 
put &amp;amp;bc "{\fs28\b Listing 1: Smoking in Framingham Heart Study for the First 90 Observations}" &amp;amp;e; 
%nt(1, h=1, w=1, hd=1);    **** hd=0 will turn off the header for page 2 and after; 
put &amp;amp;bc "{\b Smoking}" &amp;amp;e; 
%nt(1, h=1, w=1, hd=0); 
end; 
put &amp;amp;bc smoking &amp;amp;e; 
if eof then do; %nt(100); end; 
run; &lt;/PRE&gt;
&lt;P&gt;The %nt macro code was published in 1998 in SAS&amp;nbsp;Observations 13, and an RTF output from the above program is also attached.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jianmin Long&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 21:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/772021#M25327</guid>
      <dc:creator>Jianmin</dc:creator>
      <dc:date>2021-10-04T21:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: In ODS RTF/PROC REPORT, is there a way to show the table header on the first page only?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/772028#M25328</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/396004"&gt;@ble9245&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a link to the %NT macro, it was renamed as %RTF in the publication;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://ftp.sas.com/techsup/download/observations/obswww13/obswww13.pdf" target="_blank"&gt;http://ftp.sas.com/techsup/download/observations/obswww13/obswww13.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jianmin Long&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 21:35:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/In-ODS-RTF-PROC-REPORT-is-there-a-way-to-show-the-table-header/m-p/772028#M25328</guid>
      <dc:creator>Jianmin</dc:creator>
      <dc:date>2021-10-04T21:35:53Z</dc:date>
    </item>
  </channel>
</rss>

