<?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: Adding space between before break and rbreak in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-space-between-before-break-and-rbreak/m-p/376285#M90299</link>
    <description>&lt;P&gt;The skip option works only in ODS LISTING. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a blank line between the grand total and the first subtotal row, it could be as simple as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    compute before;
      line ' ';
    endcomp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example code, modified from code in Cynthia Zender's SAS Global Forum 2017 paper, available at&amp;nbsp;&lt;A title="link to Cynthia Zender's paper on SAS web site" href="http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data shoes;
  length Product $ 31;
  set sashelp.shoes;
run;

proc report data=shoes spanrows style(summary)=Header;
	column region product sales returns Profit inventory PctInv;
	define region / group noprint;
	define product / group;
	define profit / computed f=dollar14.;
	define pctinv / computed f=percent9.2;
	*** column and define statements same as previous code ***;
	*** compute block for pctinv same as previous code ***;
	break before region/summarize;
	rbreak before / summarize;
	compute pctinv;
		profit=sum(sales.sum, -1*returns.sum);
		pctinv=sales.sum / inventory.sum;
	endcomp;
	compute product;
 	  if upcase(_break_)='REGION' then
		  product=catx(' ', region, 'Total');
	  else if _break_='_RBREAK_' then 
		   product='Grand Total';
    endcomp;
    compute before;
      line ' ';
    endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Part of the output from the example code:&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/10349iA181782874D6B199/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="PROC REPORT with blank line between grand total row and subtotal row.jpg" title="PROC REPORT with blank line between grand total row and subtotal row.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jane Eslinger's SAS Global Forum 2015 paper, available at&amp;nbsp;&lt;A title="link to Jane Eslinger's paper on SAS support site" href="https://support.sas.com/resources/papers/proceedings15/SAS1642-2015.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings15/SAS1642-2015.pdf&lt;/A&gt;, discusses adding blank rows, starting on page 11.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2017 23:19:39 GMT</pubDate>
    <dc:creator>SuzanneDorinski</dc:creator>
    <dc:date>2017-07-15T23:19:39Z</dc:date>
    <item>
      <title>Adding space between before break and rbreak</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-space-between-before-break-and-rbreak/m-p/370147#M88403</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a space between the attached Grand Total and subtotal but having difficulty figuring out how to code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;break&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;before&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Groupm / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;ol&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;summarize&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;skip&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;break&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;after&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Groupm / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;page&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;rbreak&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;before&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;summarize&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;skip&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;compute&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Service_Category;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _break_=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'_RBREAK_'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Service_Category=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'Grand Total'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;call&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;define&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;_row_&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style=[font_weight=bold color = white background = grey]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; upcase(_break_)=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"GROUPM"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Service_Category=Groupm;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;call&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;define&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;_row_&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style=[font_weight=bold color = white background = grey]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Service_Category = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; || Service_Category;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;endcomp&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;compute&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;after&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Service_Category;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; _break_=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'_RBREAK_'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Line&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;call&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;define&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;_row_&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'style=[font_weight=black color = white background = black]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;endcomp&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 20:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-space-between-before-break-and-rbreak/m-p/370147#M88403</guid>
      <dc:creator>cbarks</dc:creator>
      <dc:date>2017-06-23T20:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding space between before break and rbreak</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-space-between-before-break-and-rbreak/m-p/376285#M90299</link>
      <description>&lt;P&gt;The skip option works only in ODS LISTING. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a blank line between the grand total and the first subtotal row, it could be as simple as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    compute before;
      line ' ';
    endcomp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example code, modified from code in Cynthia Zender's SAS Global Forum 2017 paper, available at&amp;nbsp;&lt;A title="link to Cynthia Zender's paper on SAS web site" href="http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data shoes;
  length Product $ 31;
  set sashelp.shoes;
run;

proc report data=shoes spanrows style(summary)=Header;
	column region product sales returns Profit inventory PctInv;
	define region / group noprint;
	define product / group;
	define profit / computed f=dollar14.;
	define pctinv / computed f=percent9.2;
	*** column and define statements same as previous code ***;
	*** compute block for pctinv same as previous code ***;
	break before region/summarize;
	rbreak before / summarize;
	compute pctinv;
		profit=sum(sales.sum, -1*returns.sum);
		pctinv=sales.sum / inventory.sum;
	endcomp;
	compute product;
 	  if upcase(_break_)='REGION' then
		  product=catx(' ', region, 'Total');
	  else if _break_='_RBREAK_' then 
		   product='Grand Total';
    endcomp;
    compute before;
      line ' ';
    endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Part of the output from the example code:&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/10349iA181782874D6B199/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="PROC REPORT with blank line between grand total row and subtotal row.jpg" title="PROC REPORT with blank line between grand total row and subtotal row.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jane Eslinger's SAS Global Forum 2015 paper, available at&amp;nbsp;&lt;A title="link to Jane Eslinger's paper on SAS support site" href="https://support.sas.com/resources/papers/proceedings15/SAS1642-2015.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings15/SAS1642-2015.pdf&lt;/A&gt;, discusses adding blank rows, starting on page 11.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 23:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-space-between-before-break-and-rbreak/m-p/376285#M90299</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2017-07-15T23:19:39Z</dc:date>
    </item>
  </channel>
</rss>

