<?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: 3 layers of spanned headers in PROC REPORT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342224#M18150</link>
    <description>&lt;P&gt;hi Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for the code. [textdecoration=underline] generates an underline at the length of the text. But I wish the line under test and retest reliability will cover the 3 groups at its lower level as &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7823iA77E040889799365/image-size/original?v=1.0&amp;amp;px=-1" alt="SAS_spanned_headers_3layers_dashlines.png" title="SAS_spanned_headers_3layers_dashlines.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the line length of &lt;STRONG&gt;[textdecoration=underline...] &lt;/STRONG&gt;cannot be changed, is it possible to edit my old code ("\brdrb\brdrdot\brdrw5\brdrcf1 header text") to generate solid underlines? You can see all my lines are dash lines. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 18 Mar 2017 06:01:16 GMT</pubDate>
    <dc:creator>Chang</dc:creator>
    <dc:date>2017-03-18T06:01:16Z</dc:date>
    <item>
      <title>3 layers of spanned headers in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/341952#M18140</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to generate a table with 2 layers of spanned headers, as the following example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7803i497BA2FF88AFF103/image-size/original?v=1.0&amp;amp;px=-1" alt="SAS_spanned_headers_01_2_levels.png" title="SAS_spanned_headers_01_2_levels.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;I would like to add another header on top of NU1-NU2 (N=132),&amp;nbsp;NU2-NU3 (N=20) and&amp;nbsp;NU1-NU3 (N=22), as the following example. Notice there gaps between the three middle layer headers are preserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7804i5B67B8BE0306BCA1/image-size/original?v=1.0&amp;amp;px=-1" alt="SAS_spanned_headers_02_3_levels.png" title="SAS_spanned_headers_02_3_levels.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;Here is my code for generating the table with 2 layer spanned headers. My script "\brdrb\brdrdot\brdrw5\brdrcf1" in the column statement is a bit awkard. Hope there is a better way to achieve the same effect on the header text. Any suggestion would be appreciated. Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*----------------------------------------import data into SAS-----------------------------------------*/

data tem._NU_manuscript01_table01	;
	set &amp;amp;tDat_cronbach_ICC_SPHERE12.	;
	gap01='';	/*add gap01, gap02 for inserting blank in PROC REPORT*/
	gap02='';
	gap03="";
	gap04="";
	TT=1; /*insert this variable for breaking pages*/
run;

/*-------------------------Add titles and footnotes--------------------------------------------------------------------*/

/*change a procedure label*/
/*ods proclabel="&amp;amp;tTitle_cronbach_ICC_SPHERE12."	;*/
 
/*first node kept and used in table of contents*/
title4 J=L /*this is SAS data set name*/
		font='Times New Roman' 
		h=10pt "Data Source: &amp;amp;tDat_cronbach_ICC_SPHERE12." 
	;

title5 J=L /*this is the table title*/
		font='Times New Roman' 
		h=10pt "&amp;amp;tableTitle1."
	;  
footnote j=l /*this is the footnote*/
			 font='Times New Roman' 
			 h=10pt "Program Name: &amp;amp;tScr_cronbach_ICC_SPHERE12.			Programmer: Chang			Date:%sysfunc(date(),worddate18.)"	
	;
/*----------------------------------------add table body-----------------------------------------------------------*/

proc report	data=tem._NU_manuscript01_table01
					contents=""  /*remove default 2nd node*/
					nowd 
					split='|'
					style(report)={
								   width=100%  
								   cellpadding=8px
								   font_face='Times New Roman' 
								   font_size=10pt 
								   background = TRANSPARENT}
				    style(header)={just=center /*left */ 
								   font_weight=bold 
								   font_face='Times New Roman' 
								   font_size=10pt 
								   font_style=roman 
								   protectspecialchars = OFF 
								   background = TRANSPARENT}
					 style(column)={font_face='Times New Roman' 
									font_size=10pt 
									background = TRANSPARENT}
     ;

/*The COLUMN statement is used to list each report column*/
column 
	itemOmit number_of_items 
	("\brdrb\brdrdot\brdrw5\brdrcf1 Internal consistency" sample_size cronbach_alpha )
    gap01 /*insert a gap between columns with two-level headers*/

	("\brdrb\brdrdot\brdrw5\brdrcf1 NU1-NU2 (N=132) " NU1nNU2_ICC_95CI NU1nNU2_ICC_pvalue)
    gap02 /*insert a gap between columns with two-level headers*/

	("\brdrb\brdrdot\brdrw5\brdrcf1 NU2-NU3 (N=20)" NU2nNU3_ICC_95CI NU2nNU3_ICC_pvalue)
    gap03 /*insert a gap between columns with two-level headers*/

	("\brdrb\brdrdot\brdrw5\brdrcf1 NU1-NU3 (N=22)" NU1nNU3_ICC_95CI NU1nNU3_ICC_pvalue)
    gap04 /*insert a gap between columns with two-level headers*/
 		;

/*Each column, in turn, has a DEFINE statement that describes how that column is created and formatted.*/
%def_display(	cVar=itemOmit,				cName=SPHERE12 item,	cWide=6 cm, headerAlign=left, colAlign=left);
%def_display(	cVar=number_of_items,	cName=Number of items,		cWide=1.5 cm, colAlign=left);
%def_display(	cVar=sample_size,			cName=Sample size,			cWide=1.5 cm, colAlign=left);
%def_display(	cVar=cronbach_alpha,		cName=Cronbach alpha,		cWide=1.5 cm, colAlign=left);

%def_display(	cVar=NU1nNU2_ICC_95CI,		cName=ICC,		cWide=3 cm, colAlign=left);
%def_display(	cVar=NU1nNU2_ICC_pvalue,		cName=p value,	cWide=1.5 cm, colAlign=left);

%def_display(	cVar=NU2nNU3_ICC_95CI,		cName=ICC,		cWide=3 cm, colAlign=left);
%def_display(	cVar=NU2nNU3_ICC_pvalue,		cName=p value,	cWide=1.5 cm, colAlign=left);

%def_display(	cVar=NU1nNU3_ICC_95CI,		cName=ICC,		cWide=3 cm, colAlign=left);
%def_display(	cVar=NU1nNU3_ICC_pvalue,		cName=p value,	cWide=1.5 cm, colAlign=left);

/*define all the gap variables*/
%def_display(	cVar=gap01	,cName=			,isFmt=N	,cFmt=					,cWide=0.2%);
%def_display(	cVar=gap02	,cName=			,isFmt=N	,cFmt=					,cWide=0.2%);
%def_display(	cVar=gap03	,cName=			,isFmt=N	,cFmt=					,cWide=0.2%);
%def_display(	cVar=gap04	,cName=			,isFmt=N	,cFmt=					,cWide=0.2%);

compute after _page_ /style={just=l 
							 font_size=10pt 
							 font_face='Times New Roman'  
							 borderbottomcolor=white 
							 bordertopcolor=black}	;	
	line 	"&amp;amp;tableFootnote1.";	
endcomp;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Mar 2017 12:54:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/341952#M18140</guid>
      <dc:creator>Chang</dc:creator>
      <dc:date>2017-03-17T12:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: 3 layers of spanned headers in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/341956#M18141</link>
      <description>Hi:&lt;BR /&gt;  I'm not sure what you're asking. I do see the 2 layers of spanned header in your top screen shot.  The title of your post asks about 3 layers of spanned header, but then you don't show WHAT the 3rd header is, it might be what you show in red in the 2nd screen shot, but that looks like a piece of a data table, not a piece of the report. Are you trying to add what is in red??&lt;BR /&gt;&lt;BR /&gt;Why not use style=journal and textdecoration=underline???&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Fri, 17 Mar 2017 13:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/341956#M18141</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-17T13:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: 3 layers of spanned headers in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/341962#M18142</link>
      <description>&lt;P&gt;hi Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes I am asking for 3 layer spanned headers. To illustrate what I want, I edited an excel file and copied the text there as a picture. I marked the header in red just to make it noticeable. It doesn't need to be colored in my table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="405"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="4" width="202"&gt;test and retest reliability&lt;/TD&gt;
&lt;TD width="11"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="2"&gt;NU1-NU2 (N=132)&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="2"&gt;NU2-NU3 (N=20)&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD colspan="2"&gt;NU1-NU3 (N=22)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;ICC&lt;/TD&gt;
&lt;TD&gt;p value&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;ICC&lt;/TD&gt;
&lt;TD&gt;p value&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;ICC&lt;/TD&gt;
&lt;TD&gt;p value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 17 Mar 2017 13:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/341962#M18142</guid>
      <dc:creator>Chang</dc:creator>
      <dc:date>2017-03-17T13:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: 3 layers of spanned headers in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342032#M18146</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Well, the key will be coding the column statement and getting the parentheses nested correctly. This example uses SASHELP.CARS and the JOURNAL style, as shown -- to do more than 3 headers.&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7809i6170EE177119CACA/image-size/original?v=1.0&amp;amp;px=-1" alt="underline_header_report.png" title="underline_header_report.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 16:02:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342032#M18146</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-17T16:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: 3 layers of spanned headers in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342224#M18150</link>
      <description>&lt;P&gt;hi Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for the code. [textdecoration=underline] generates an underline at the length of the text. But I wish the line under test and retest reliability will cover the 3 groups at its lower level as &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7823iA77E040889799365/image-size/original?v=1.0&amp;amp;px=-1" alt="SAS_spanned_headers_3layers_dashlines.png" title="SAS_spanned_headers_3layers_dashlines.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the line length of &lt;STRONG&gt;[textdecoration=underline...] &lt;/STRONG&gt;cannot be changed, is it possible to edit my old code ("\brdrb\brdrdot\brdrw5\brdrcf1 header text") to generate solid underlines? You can see all my lines are dash lines. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 06:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342224#M18150</guid>
      <dc:creator>Chang</dc:creator>
      <dc:date>2017-03-18T06:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: 3 layers of spanned headers in PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342255#M18151</link>
      <description>Hi, Chang:&lt;BR /&gt;  Text decoration is meant to only underline the text in the cell. The commands you are inserting are RTF control strings: &lt;BR /&gt;"\brdrb\brdrdot\brdrw5\brdrcf1 header text"&lt;BR /&gt;&lt;BR /&gt;  It's been awhile since I did RTF using the Microsoft controls, but I think that your issue is with the&lt;BR /&gt;\brdrb = bottom border&lt;BR /&gt;\brdrdot = dotted border&lt;BR /&gt;\brdrw5 = not sure I think this is border width for RTF (in twips)&lt;BR /&gt;\brdrcf1 = not sure I think this is color for border&lt;BR /&gt;&lt;BR /&gt;  Since the \brdr... commands are Microsoft RTF spec, you'll have to investigate what there should be instead of \brdrdot.&lt;BR /&gt;&lt;BR /&gt;Here's a page with the RTF spec:&lt;BR /&gt;&lt;A href="http://hackipedia.org/File%20formats/RTF,%20Rich%20Text%20Format/RTF%20v1.9.1.doc.pdf" target="_blank"&gt;http://hackipedia.org/File%20formats/RTF,%20Rich%20Text%20Format/RTF%20v1.9.1.doc.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;  I believe it is under Paragraph formatting for borders...approximately page 85-90.&lt;BR /&gt; &lt;BR /&gt;cynthia&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Mar 2017 18:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/3-layers-of-spanned-headers-in-PROC-REPORT/m-p/342255#M18151</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-18T18:32:21Z</dc:date>
    </item>
  </channel>
</rss>

