<?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: How to insert a blank line above and below for only one  variable in proc report? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345611#M18237</link>
    <description>&lt;P&gt;Hi: HEADLINE and HEADSKIP options are LISTING only options and will never work with RTF destinations or any destination that supports style. Those options were originally designed for the SAS output windows or "LST" output and were never carried forward into the world of ODS style.&lt;BR /&gt;&lt;BR /&gt;Also, your code has STYLE=x.styles, which you do not provide.&lt;BR /&gt;&lt;BR /&gt;It does not matter. There really isn't the concept of "lines" really, but you can insert spaces and if you use the textdecoration=underline or overline, you can mimic lines, but they will be in a proportional spaced font.&lt;BR /&gt;&lt;BR /&gt;AND, when I try your code, even without the style, I get an error:&lt;BR /&gt;ERROR: Variable numobs is not on file WORK.CLASS3.&lt;BR /&gt;&lt;BR /&gt;Does your code, as posted, work without errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm not sure of your purpose for the PROC MEANS followed by the transpose. Many of the statistics you can get out of MEANS you can also request directly from PROC REPORt and/or PROC TABULATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; For example, consider this code that uses SASHELP.CLASS directly without MEANS/TRANSPOSE and uses the JOURNAL style (since you did not provide your style):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value $genfmt 'F' = 'Female'
               'M' = 'Male'
	       'T' = 'Total';
run;
  
ods rtf file='c:\temp\direct_report_stat.rtf' style=journal;

proc report data=sashelp.class;
  column sex n height,(sum mean max) weight,(sum mean max);
  define sex / group f=$genfmt.;
  define n / 'NumObs';
  define height / analysis;
  define weight / analysis;
  define sum / 'Sum' f=comma6.1;
  define mean / 'Mean' f=6.1;
  define max / 'Max' f=6.1;
  rbreak after / summarize;
  compute sex;
    if _break_ = '_RBREAK_' then do;
	   sex = 'T';
	end;
  endcomp;
run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; And, output is (shown in RTF and HTML):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8030i4ECE39EA70981B92/image-size/original?v=1.0&amp;amp;px=-1" alt="direct_report.png" title="direct_report.png" border="0" /&gt;&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 02:26:51 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2017-03-30T02:26:51Z</dc:date>
    <item>
      <title>How to insert a blank line above and below for only one  variable in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345564#M18233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am using a proc report to generate a summary. I would like to insert a blank line &amp;nbsp;above and below for only one variable and rest of them wihout any blank lines.&lt;/P&gt;
&lt;P&gt;I am not able use &amp;nbsp;the headline for ODS RTF output.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The format is some what like the below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Header&lt;/P&gt;
&lt;P&gt;----------&lt;/P&gt;
&lt;P&gt;Space&lt;/P&gt;
&lt;P&gt;Overall value&lt;/P&gt;
&lt;P&gt;space&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;var2&lt;/P&gt;
&lt;P&gt;var3&lt;/P&gt;
&lt;P&gt;------------&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345564#M18233</guid>
      <dc:creator>new510</dc:creator>
      <dc:date>2017-03-29T22:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a blank line above and below for only one  variable in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345569#M18234</link>
      <description>&lt;P&gt;As a minimum you show code of what you have so far. Things interact in proc report and knowing things like the order of columns and such may help provide a solution. Better would be to include a data, in the form of a data step, so we can test against some of your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can turn a SAS data set into data step code:Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:23:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345569#M18234</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-29T22:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a blank line above and below for only one  variable in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345606#M18236</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This is the sample code i have put it under. I want a line under the 'Total' and above and rest of them without any spaces.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;data class;&lt;/DIV&gt;
&lt;DIV&gt;set sashelp.class;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;proc means data=class nmiss sum;&lt;/DIV&gt;
&lt;DIV&gt;class sex;&lt;/DIV&gt;
&lt;DIV&gt;var height weight;&lt;/DIV&gt;
&lt;DIV&gt;output out=class2 sum=;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;data class3;&lt;/DIV&gt;
&lt;DIV&gt;length gender $8;&lt;/DIV&gt;
&lt;DIV&gt;set class2;&lt;/DIV&gt;
&lt;DIV&gt;gender=sex;&lt;/DIV&gt;
&lt;DIV&gt;if _type_=0 and sex='' then do;&lt;/DIV&gt;
&lt;DIV&gt;gender='Total';&lt;/DIV&gt;
&lt;DIV&gt;end;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;proc transpose data=class3 out=trans4;&lt;/DIV&gt;
&lt;DIV&gt;by sex;&lt;/DIV&gt;
&lt;DIV&gt;var _numeric_;&lt;/DIV&gt;
&lt;DIV&gt;id gender;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods rtf file='c:\test.rtf' style=x.styles;&lt;/DIV&gt;
&lt;DIV&gt;proc report data=class3 headskip headline nowd split='*';&lt;/DIV&gt;
&lt;DIV&gt;column &amp;nbsp;_type_ numobs &amp;nbsp;gender height weight ;&lt;/DIV&gt;
&lt;DIV&gt;define numobs/ &amp;nbsp;order order=internal noprint;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;define gender/'Gender' display order order=internal style={cellwidth=5%};&lt;/DIV&gt;
&lt;DIV&gt;define height/'Height' display order order=internal style={cellwidth=5%};&lt;/DIV&gt;
&lt;DIV&gt;define weight/'Weight' display order order=internal style={cellwidth=5%};&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods rtf close;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thank you &amp;nbsp;in advance.&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Mar 2017 01:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345606#M18236</guid>
      <dc:creator>new510</dc:creator>
      <dc:date>2017-03-30T01:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a blank line above and below for only one  variable in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345611#M18237</link>
      <description>&lt;P&gt;Hi: HEADLINE and HEADSKIP options are LISTING only options and will never work with RTF destinations or any destination that supports style. Those options were originally designed for the SAS output windows or "LST" output and were never carried forward into the world of ODS style.&lt;BR /&gt;&lt;BR /&gt;Also, your code has STYLE=x.styles, which you do not provide.&lt;BR /&gt;&lt;BR /&gt;It does not matter. There really isn't the concept of "lines" really, but you can insert spaces and if you use the textdecoration=underline or overline, you can mimic lines, but they will be in a proportional spaced font.&lt;BR /&gt;&lt;BR /&gt;AND, when I try your code, even without the style, I get an error:&lt;BR /&gt;ERROR: Variable numobs is not on file WORK.CLASS3.&lt;BR /&gt;&lt;BR /&gt;Does your code, as posted, work without errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm not sure of your purpose for the PROC MEANS followed by the transpose. Many of the statistics you can get out of MEANS you can also request directly from PROC REPORt and/or PROC TABULATE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; For example, consider this code that uses SASHELP.CLASS directly without MEANS/TRANSPOSE and uses the JOURNAL style (since you did not provide your style):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value $genfmt 'F' = 'Female'
               'M' = 'Male'
	       'T' = 'Total';
run;
  
ods rtf file='c:\temp\direct_report_stat.rtf' style=journal;

proc report data=sashelp.class;
  column sex n height,(sum mean max) weight,(sum mean max);
  define sex / group f=$genfmt.;
  define n / 'NumObs';
  define height / analysis;
  define weight / analysis;
  define sum / 'Sum' f=comma6.1;
  define mean / 'Mean' f=6.1;
  define max / 'Max' f=6.1;
  rbreak after / summarize;
  compute sex;
    if _break_ = '_RBREAK_' then do;
	   sex = 'T';
	end;
  endcomp;
run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; And, output is (shown in RTF and HTML):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8030i4ECE39EA70981B92/image-size/original?v=1.0&amp;amp;px=-1" alt="direct_report.png" title="direct_report.png" border="0" /&gt;&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 02:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345611#M18237</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-30T02:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert a blank line above and below for only one  variable in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345670#M18239</link>
      <description>&lt;P&gt;Make a dummy group variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 set sashelp.class;
 retain g 1;
run;

proc report data=class nowd;
column g sex weight;
define g/group noprint;
define sex/group;
define weight/sum;


compute before g;
line ' ';
endcomp;

compute before;
line ' ';
endcomp;
break before g/summarize;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8037iEA84E5337B8FEA64/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="x.png" title="x.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 07:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-insert-a-blank-line-above-and-below-for-only-one-variable/m-p/345670#M18239</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-30T07:52:59Z</dc:date>
    </item>
  </channel>
</rss>

