<?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: Any new updates on Spanning columns in proc report? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355678#M18538</link>
    <description>&lt;P&gt;By the way, after a cursory reviewer of the code below, I can't tell you how much this interace is going to improve my life!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; Since I try to automate all my code, and I have a need to span columns, this will be critical to those endeavor.&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 17:02:43 GMT</pubDate>
    <dc:creator>statistician13</dc:creator>
    <dc:date>2017-05-03T17:02:43Z</dc:date>
    <item>
      <title>Any new updates on Spanning columns in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355386#M18521</link>
      <description>&lt;P&gt;I know you can span headers in proc report and I've read some 5 year old threads here indicating at that time that it wasn't possible to span data cells across columns in proc report.&amp;nbsp; Is that still the case or has this changed?&amp;nbsp; I'm hoping to span a number of data cells across columns (not at the header level).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 20:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355386#M18521</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2017-05-02T20:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Any new updates on Spanning columns in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355421#M18524</link>
      <description>&lt;P&gt;I've managed to do something like that by writing raw html but I don't think that Proc Report has or will have that behavior. Consider that one of the main things for Report is to do sums and such at breaks. WHICH column would such a "data" value be in for inclusion in a group "total"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pretty much anything that spans over two or more columns or rows should be a categorical variable in most cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOWEVER, going back to very old school with a data step youi can place characters anywhere on a page using PUT with the @, /&amp;nbsp;and # column and line pointer controls.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 22:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355421#M18524</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-02T22:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Any new updates on Spanning columns in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355425#M18525</link>
      <description>Thanks.  Right, I'm trying to avoid writing raw HTML or RTF script.  I may have a hack in RTF that I'm exploring now that would require just writing a single span statement.  If I figured it out, i'll post back.  Thanks for the info.</description>
      <pubDate>Tue, 02 May 2017 22:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355425#M18525</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2017-05-02T22:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Any new updates on Spanning columns in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355430#M18526</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;PROC REPORT does not let you span columns in the data cells, but the new (9.4) Report Writing Interface will let you span data cells. See the example below (long code, spanning is shown in output #2).&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8672i14FAE3DA465EE232/image-size/original?v=1.0&amp;amp;px=-1" alt="span_rwi_data_cell.png" title="span_rwi_data_cell.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the code is (note that you will see a message in the log that RWI is not supported for RTF -- I have not had issues with simple tables, but you might not get the results you want in RTF, the same way as in PDF and HTML):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; title; footnote;

ods html file="c:\temp\iris_span_data_cols.html";
ods pdf file="c:\temp\iris_span_data_cols.pdf" notoc startpage=no;
ods rtf file="c:\temp\iris_span_data_cols.rtf" startpage=no;

ods escapechar='~'; 

title '1) Partial Detail Report';
data _null_; 
  set SASHELP.IRIS(obs=6) end=last; 
  if _N_ = 1 then do; 
      dcl odsout obj(); 
      obj.table_start(); 
      obj.head_start(); 
	  ** Header row 1;
	  obj.row_start(type:"Header");
      obj.format_cell(text: "Span 3 Header", column_span:3, style_attr:"color=black backgroundcolor=CXd98cb3"); 
      obj.format_cell(text: "Span Last 3", column_span:3,style_attr:"color=black backgroundcolor=CX2e852e"); 
      obj.row_end(); 
	  ** Header row 2;
	  obj.row_start(type:"Header");
      obj.format_cell(text: "Second Spanning Header", column_span:3,style_attr:"color=black backgroundcolor=CXd98cb3"); 
      obj.format_cell(text: "Another Header Row", column_span:3,style_attr:"color=black backgroundcolor=CX2e852e"); 
      obj.row_end(); 
	  ** Header row 3;
      obj.row_start(type: "Header"); 
      obj.format_cell(text: "Species", style_attr:"color=black backgroundcolor=CXd98cb3 fontweight=bold"); 
      obj.format_cell(text: "SepalLength", style_attr:"color=black backgroundcolor=CXd98cb3 fontweight=bold"); 
      obj.format_cell(text: "SepalWidth", style_attr:"color=black backgroundcolor=CXd98cb3 fontweight=bold"); 
      obj.format_cell(text: "PetalLength", style_attr:"color=black backgroundcolor=CX2e852e fontweight=bold"); 
      obj.format_cell(text: "PetalWidth", style_attr:"color=black backgroundcolor=CX2e852e fontweight=bold"); 
      obj.format_cell(text: "New Var",style_attr:"color=black backgroundcolor=CX2e852e fontweight=bold"); 
      obj.row_end(); 
      obj.head_end(); 
    end;
  ** row for every obs;
	  newvar = sum(of _numeric_);
      obj.row_start(); 
      obj.format_cell(data: species ); 
      obj.format_cell(data: SepalLength); 
      obj.format_cell(data: SepalWidth); 
      obj.format_cell(data: PetalLength); 
      obj.format_cell(data: PetalWidth); 
      obj.format_cell(data: newvar); 
      obj.row_end(); 
   
  if last then do; 
      obj.table_end(); 
    end; 
run; 
   

title '2) Partial Detail Report with spanning data cells';
data _null_; 
  set SASHELP.IRIS(obs=6) end=last; 
  if _N_ = 1 then do; 
      dcl odsout obj(); 
      obj.table_start(); 
      obj.head_start(); 
	  ** Header row 1;
	  obj.row_start(type:"Header");
      obj.format_cell(text: "Span 3 Header", column_span:3, style_attr:"color=black backgroundcolor=CXd98cb3"); 
      obj.format_cell(text: "Span Last 3", column_span:3,style_attr:"color=black backgroundcolor=CX2e852e"); 
      obj.row_end(); 
	  ** Header row 2;
	  obj.row_start(type:"Header");
      obj.format_cell(text: "Second Spanning Header", column_span:3,style_attr:"color=black backgroundcolor=CXd98cb3"); 
      obj.format_cell(text: "Another Header Row", column_span:3,style_attr:"color=black backgroundcolor=CX2e852e"); 
      obj.row_end(); 
	  ** Header row 3;
      obj.row_start(type: "Header"); 
      obj.format_cell(text: "Species", style_attr:"color=black backgroundcolor=CXd98cb3 fontweight=bold"); 
      obj.format_cell(text: "SepalLength", style_attr:"color=black backgroundcolor=CXd98cb3 fontweight=bold"); 
      obj.format_cell(text: "SepalWidth", style_attr:"color=black backgroundcolor=CXd98cb3 fontweight=bold"); 
      obj.format_cell(text: "PetalLength", style_attr:"color=black backgroundcolor=CX2e852e fontweight=bold"); 
      obj.format_cell(text: "PetalWidth", style_attr:"color=black backgroundcolor=CX2e852e fontweight=bold"); 
      obj.format_cell(text: "New Var",style_attr:"color=black backgroundcolor=CX2e852e fontweight=bold"); 
      obj.row_end(); 
      obj.head_end(); 
    end;
	if _n_ = 1 then do;
	  obj.row_start(type:"Data");
      obj.format_cell(text: "A very important note", column_span:6,style_attr:"color=black backgroundcolor=white"); 
      obj.row_end(); 
	end;
  ** row for every obs;
	  newvar = sum(of _numeric_);
      obj.row_start(); 
      obj.format_cell(data: species ); 
      if sepallength lt 50 then do;
         obj.format_cell(data: SepalLength); 
         obj.format_cell(data: SepalWidth); 
	  end;
	  else if sepallength ge 50 then do;
	     tempvar = catx(' ','SL=',sepallength,'SW=',sepalwidth);
         obj.format_cell(data: tempvar,column_span:2, style_attr:"backgroundcolor=lightyellow"); 
	  end;
      obj.format_cell(data: PetalLength); 
      obj.format_cell(data: PetalWidth); 
      obj.format_cell(data: newvar); 
      obj.row_end(); 
   
  if last then do; 
      obj.table_end(); 
    end; 
run; 

ods _all_ close; 

title; footnote;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 May 2017 23:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355430#M18526</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-05-02T23:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Any new updates on Spanning columns in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355676#M18537</link>
      <description>&lt;P&gt;This is amazing, &lt;SPAN class="UserName lia-user-name lia-user-rank-SAS-Super-FREQ"&gt; &lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" style="color: #339900;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549" target="_self"&gt;&lt;SPAN class="login-bold"&gt;Cynthia_sas&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;.&amp;nbsp; Thanks so much for this.&amp;nbsp; I am working with 9.4 now and haven't yet dug into the report writing interface.&amp;nbsp; I'm digging in now.&amp;nbsp; Much appreciated.&amp;nbsp; This is exactly what I'm looking for!&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 17:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355676#M18537</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2017-05-03T17:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Any new updates on Spanning columns in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355678#M18538</link>
      <description>&lt;P&gt;By the way, after a cursory reviewer of the code below, I can't tell you how much this interace is going to improve my life!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; Since I try to automate all my code, and I have a need to span columns, this will be critical to those endeavor.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 17:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Any-new-updates-on-Spanning-columns-in-proc-report/m-p/355678#M18538</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2017-05-03T17:02:43Z</dc:date>
    </item>
  </channel>
</rss>

