<?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: Report doubt in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305920#M65330</link>
    <description>&lt;P&gt;The only thing I can think is making a table contain these variables name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=sashelp.class(obs=0) out=class;
 var _all_;
run;
proc transpose data=class out=want(drop=_name_ _label_);
 var _name_;
run;
proc report data=want noheader nowd;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Oct 2016 11:37:54 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-10-20T11:37:54Z</dc:date>
    <item>
      <title>PROC REPORT: Create heading only when no data present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305896#M65320</link>
      <description>&lt;P&gt;how can i get only headers without any data when i write a proc report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will be help for me when there is no data in the dataset&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vamsi.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 14:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305896#M65320</guid>
      <dc:creator>SBRVamsi</dc:creator>
      <dc:date>2016-10-25T14:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Report doubt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305900#M65324</link>
      <description>&lt;P&gt;You can't directly. &amp;nbsp;Output is only generated when there is data. &amp;nbsp;Now you could do one of two things:&lt;/P&gt;
&lt;P&gt;Insert a record into the empty dataset which states "No data to report" or something similar - this is what I tend to do, seen it many times across my field, as its clear then that there is no data to report.&lt;/P&gt;
&lt;P&gt;The other alternative is to put some default value/text into the dataset, and when you report it, set the font color to be the same as the background color, hence hiding the text, you will just see an empty report - however not recommended as this could also occur if page breaks are messed up or some other problem happens, so its not clear to the reviewer.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 10:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305900#M65324</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-20T10:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Report doubt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305920#M65330</link>
      <description>&lt;P&gt;The only thing I can think is making a table contain these variables name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=sashelp.class(obs=0) out=class;
 var _all_;
run;
proc transpose data=class out=want(drop=_name_ _label_);
 var _name_;
run;
proc report data=want noheader nowd;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 11:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/305920#M65330</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-10-20T11:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT: Create heading only when no data present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/306003#M65370</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
   stop;
   set sashelp.class;
   run;

*if class has 0 obs add 1 with missing values for all variables;
*if class has obs this does nothing;
data class;
   if eof then output;
   stop;
   modify class end=eof;
   run;

options missing=' ';
proc report data=class missing;
   columns _all_;
   define _all_ / display;
   define name / order;
   compute before name;
      holdname=name;
      endcomp;
   compute after;
      if missing(holdname) then l=40; else l=0;
      msg = 'No data to report';
      line msg $varying40. l;
      endcomp;
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Oct 2016 14:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/306003#M65370</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-10-25T14:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT: Create heading only when no data present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/341726#M78252</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;I especially like your use of the $VARYING. format to essentially conditionally execute the LINE statement.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 18:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/341726#M78252</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2017-03-16T18:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT: Create heading only when no data present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/341782#M78283</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13683"&gt;@ArtC&lt;/a&gt;&amp;nbsp;I think it is worth mentioning this Usage Note: &lt;A href="http://support.sas.com/kb/37/763.html" target="_blank"&gt;http://support.sas.com/kb/37/763.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 21:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/341782#M78283</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-03-16T21:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT: Create heading only when no data present</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/341874#M78321</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;I do so love to learn, of course remembering is even better (and all too often the real challenge) &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; .&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 06:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Create-heading-only-when-no-data-present/m-p/341874#M78321</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2017-03-17T06:35:46Z</dc:date>
    </item>
  </channel>
</rss>

