<?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 PROC REPORT: ADD Blank Line with condition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-ADD-Blank-Line-with-condition/m-p/249422#M46920</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing problem a problem to add blank line after certain condition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ROC REPORT DATA=final_report2 NOWD MISSING HEADLINE SPACING=2 SPLIT='~';&lt;BR /&gt;&amp;nbsp; COLUMN (cntr Country sort Variable Stat DummyRed DummyBlue Total);&lt;BR /&gt;&amp;nbsp; DEFINE cntr /&amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER&amp;nbsp; ORDER=data WIDTH=20 FLOW NOPRINT;&lt;BR /&gt;&amp;nbsp; DEFINE Country /'Country' display WIDTH=10 FLOW STYLE=[cellwidth=2 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;DEFINE sort / ORDER&amp;nbsp; ORDER=internal noprint;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE Variable /'Variable' ORDER ORDER=data WIDTH=20 FLOW;&lt;BR /&gt;/*&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE sort1 / ORDER NOPRINT;*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE Stat / 'Stat'&amp;nbsp; WIDTH=20 FLOW;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE DummyRed/'Dummy Red~N=658' WIDTH=20 FLOW STYLE=[ASIS=on cellwidth=3 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE DummyBlue/'Dummy Blue~N=656' WIDTH=20 FLOW STYLE=[ASIS=on cellwidth=3 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE Total/'Total~N=1773' WIDTH=20 FLOW RIGHT STYLE=[cellwidth=2.5 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;BREAK AFTER cntr / PAGE;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;COMPUTE after sort;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt; IF sort in (1 2 3) then LINE @1 ' ';&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;ENDCOMP;&lt;BR /&gt;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-There are 5 Numeric Sort at Dataset : SORT = 1 , 2, 3, 4, 5 but i want to put line only after SORT (1, 2, 3)?&lt;/P&gt;
&lt;P&gt;-But above BOLD Marked not working?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you now why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rwgards&lt;/P&gt;
&lt;P&gt;Sami&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2016 11:33:47 GMT</pubDate>
    <dc:creator>Sami</dc:creator>
    <dc:date>2016-02-11T11:33:47Z</dc:date>
    <item>
      <title>PROC REPORT: ADD Blank Line with condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-ADD-Blank-Line-with-condition/m-p/249422#M46920</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing problem a problem to add blank line after certain condition:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ROC REPORT DATA=final_report2 NOWD MISSING HEADLINE SPACING=2 SPLIT='~';&lt;BR /&gt;&amp;nbsp; COLUMN (cntr Country sort Variable Stat DummyRed DummyBlue Total);&lt;BR /&gt;&amp;nbsp; DEFINE cntr /&amp;nbsp;&amp;nbsp;&amp;nbsp; ORDER&amp;nbsp; ORDER=data WIDTH=20 FLOW NOPRINT;&lt;BR /&gt;&amp;nbsp; DEFINE Country /'Country' display WIDTH=10 FLOW STYLE=[cellwidth=2 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;DEFINE sort / ORDER&amp;nbsp; ORDER=internal noprint;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE Variable /'Variable' ORDER ORDER=data WIDTH=20 FLOW;&lt;BR /&gt;/*&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE sort1 / ORDER NOPRINT;*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE Stat / 'Stat'&amp;nbsp; WIDTH=20 FLOW;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE DummyRed/'Dummy Red~N=658' WIDTH=20 FLOW STYLE=[ASIS=on cellwidth=3 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE DummyBlue/'Dummy Blue~N=656' WIDTH=20 FLOW STYLE=[ASIS=on cellwidth=3 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DEFINE Total/'Total~N=1773' WIDTH=20 FLOW RIGHT STYLE=[cellwidth=2.5 cm];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;BREAK AFTER cntr / PAGE;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;COMPUTE after sort;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt; IF sort in (1 2 3) then LINE @1 ' ';&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;ENDCOMP;&lt;BR /&gt;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-There are 5 Numeric Sort at Dataset : SORT = 1 , 2, 3, 4, 5 but i want to put line only after SORT (1, 2, 3)?&lt;/P&gt;
&lt;P&gt;-But above BOLD Marked not working?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you now why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rwgards&lt;/P&gt;
&lt;P&gt;Sami&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 11:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-ADD-Blank-Line-with-condition/m-p/249422#M46920</guid>
      <dc:creator>Sami</dc:creator>
      <dc:date>2016-02-11T11:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT: ADD Blank Line with condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-ADD-Blank-Line-with-condition/m-p/249711#M46995</link>
      <description>&lt;P&gt;hi Sami&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc REPORT will always created break lines when using the LINE statement in a COMPUTE block. there is also the follwoing restriction:&lt;/P&gt;
&lt;TABLE class="xis-procSummary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD rowspan="2" class="xis-restriction"&gt;Restrictions:&lt;/TD&gt;
&lt;TD class="xis-summaryValue"&gt;This statement is valid only in a compute block that is associated with a location in the report.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryValue"&gt;You cannot use the LINE statement in conditional statements (IF-THEN, IF-THEN/ELSE, and SELECT) because it is not executed until PROC REPORT has executed all other statements in the compute block.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see the doc for details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There might me a away around this by using some inlineformatting functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Find below a sample program that illustrates this, seems to work ok, for HTML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  set sashelp.class;
  sort = mod(_n_, 6);
run;

ods escapechar="~";

proc report data=have;
  column sort name sex age;
  define sort / order;
  define name / display;
  define sex / display;
  define age / display;

  compute after sort / style={fontsize=2pt };
    length msg $ 64;

    if sort in (1,2,3) then do;
      msg = "~{newline 10}";
    end;
    else do;
      msg = "~{newline 0}";
    end;

    line msg $64.;
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 15:48:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-ADD-Blank-Line-with-condition/m-p/249711#M46995</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-02-12T15:48:30Z</dc:date>
    </item>
  </channel>
</rss>

