<?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 How to add a topline for the table when table has two rows of header? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923284#M363514</link>
    <description>&lt;P&gt;I want to add a topline above "TRT" row for the table. I tried&amp;nbsp;style(report) and&amp;nbsp;style(header), they both did not add the line in the correct position. Here is my program:&lt;/P&gt;
&lt;PRE&gt;ods rtf file='c:\temp\temp.rtf' startpage=no style=journal bodytitle;
proc report data=final  nowindows headline headskip split = '|' missing  
			style(report)={FONTSIZE = 10pt}
			;
    column trt tptn tpt 
        ("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} TRT"  n3 mean3 sd3 median3 min3 max3 GeomMean3 CV3);
	define trt/group noprint; 
    define tptn/order order=internal noprint;
	define tpt/group "Time Point" style=[just=l cellwidth=15%];
        .....
run;
ods rtf close.&lt;/PRE&gt;
&lt;P&gt;and my table looks like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sally_Caffrey_1-1712394276237.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95268iF9D31A56B386313C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sally_Caffrey_1-1712394276237.png" alt="Sally_Caffrey_1-1712394276237.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What I want is&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sally_Caffrey_2-1712394404201.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95269i0A0D48F13033813D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sally_Caffrey_2-1712394404201.png" alt="Sally_Caffrey_2-1712394404201.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How should I modify the program? Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Apr 2024 09:08:14 GMT</pubDate>
    <dc:creator>Sally_Caffrey</dc:creator>
    <dc:date>2024-04-06T09:08:14Z</dc:date>
    <item>
      <title>How to add a topline for the table when table has two rows of header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923284#M363514</link>
      <description>&lt;P&gt;I want to add a topline above "TRT" row for the table. I tried&amp;nbsp;style(report) and&amp;nbsp;style(header), they both did not add the line in the correct position. Here is my program:&lt;/P&gt;
&lt;PRE&gt;ods rtf file='c:\temp\temp.rtf' startpage=no style=journal bodytitle;
proc report data=final  nowindows headline headskip split = '|' missing  
			style(report)={FONTSIZE = 10pt}
			;
    column trt tptn tpt 
        ("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} TRT"  n3 mean3 sd3 median3 min3 max3 GeomMean3 CV3);
	define trt/group noprint; 
    define tptn/order order=internal noprint;
	define tpt/group "Time Point" style=[just=l cellwidth=15%];
        .....
run;
ods rtf close.&lt;/PRE&gt;
&lt;P&gt;and my table looks like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sally_Caffrey_1-1712394276237.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95268iF9D31A56B386313C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sally_Caffrey_1-1712394276237.png" alt="Sally_Caffrey_1-1712394276237.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What I want is&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sally_Caffrey_2-1712394404201.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95269i0A0D48F13033813D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sally_Caffrey_2-1712394404201.png" alt="Sally_Caffrey_2-1712394404201.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How should I modify the program? Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 09:08:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923284#M363514</guid>
      <dc:creator>Sally_Caffrey</dc:creator>
      <dc:date>2024-04-06T09:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a topline for the table when table has two rows of header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923290#M363516</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
	set sashelp.class;
	length agegr1 $7;
	if age&amp;lt;13 then agegr1 = '&amp;lt;13';
	else if age &amp;lt; 15 then agegr1 = '13-&amp;lt;15';
	else agegr1='&amp;gt;=15';
run;

proc sort data=class;
	by agegr1;
run;

data final;
	set class;
	by agegr1;
	if first.agegr1 then page+1;
run;

ods rtf file="./temp.rtf" style=RTFStyle;

PROC REPORT data=final headline headskip nowd split="~" spacing=0 missing
   style(header) = {vjust = middle font_size = 8pt font_face="Courier New"}
   style(column) = {just=l vjust = middle font_size = 8pt font_face="Courier New"}
   style(report) = {rules = groups frame = void cellpadding = 1 font_face="Courier New"}
   style(lines)  = {font_size = 8pt}   ;
   column page name sex ("^S={borderbottomcolor=black borderbottomwidth=1} Baseline Characteristics" age height weight) agegr1;
   define name / order order = internal style(header)=[just=l] style(column)=[just=l cellwidth=20%];
   define page / order order = internal noprint;
   define agegr1 /  noprint;
   define sex  / style(header)=[just=l] style(column)=[just = l cellwidth=19%];
   define age   /style(column) = {just=c cellwidth = 20%};
   define height / style(column) = {just=c cellwidth = 20%};
   define weight / style(column) = {just=c cellwidth = 20%};
  &lt;STRONG&gt; compute before _page_ /&lt;FONT color="#000000"&gt;style=[borderbottomcolor=black borderbottomwidth=1]&lt;/FONT&gt;;
		len=length(agegr1);
		line @1 "Age Group: " agegr1 $varying.len;
	endcomp;
	break after page / page;&lt;/STRONG&gt;
run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you try adding a style to the compute before _page_ block?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mazi_0-1712408174939.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95271i9265B6E2D899F846/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mazi_0-1712408174939.png" alt="Mazi_0-1712408174939.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 12:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923290#M363516</guid>
      <dc:creator>Mazi</dc:creator>
      <dc:date>2024-04-06T12:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a topline for the table when table has two rows of header?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923309#M363519</link>
      <description>&lt;P&gt;That would be better if you could post some test data.&lt;/P&gt;
&lt;P&gt;And I&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; could not replicate&lt;/STRONG&gt;&lt;/FONT&gt; your problem by your code.&lt;/P&gt;
&lt;P&gt;And the following code is an alternative way to get what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file='c:\temp\temp.rtf' startpage=no style=journal bodytitle;
proc report data=sashelp.heart(obs=10)  nowindows headline headskip split = '|' missing  
			style(report)={FONTSIZE = 10pt outputwidth=100%}
			;
    column status sex bp_status
        ("(*ESC*)R'\brdrb\brdrs\brdrw15' TRT"  weight height ageatstart);
	define status/group noprint; 
    define sex/order order=internal noprint;
	define bp_status/group "Time Point" style=[just=l cellwidth=15%];
run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1712452406651.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95274iC557731C4200F2A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1712452406651.png" alt="Ksharp_0-1712452406651.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2024 01:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-a-topline-for-the-table-when-table-has-two-rows-of/m-p/923309#M363519</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-04-07T01:13:40Z</dc:date>
    </item>
  </channel>
</rss>

