<?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: Forcing cells with 0 counts  in Proc Report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165396#M300523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the PreloadFMT with proc report:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/239-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/239-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/239-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jul 2014 16:12:01 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-07-03T16:12:01Z</dc:date>
    <item>
      <title>Forcing cells with 0 counts  in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165395#M300522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been struggling to force cells with a '0' to appear in my proc report. For instance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="76" style="border: 1px solid rgb(0, 0, 0); width: 389px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;term1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;term2&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;apples&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;oranges&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, since there are 0 entries on the entire row for apples, it will not appear on my report. I have read articles on how to do this for proc trabulate with the 'classdata' option. However, I can't figure it out when using the proc report feature. If anyone can offer advice, or point me in the right direction, it would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 16:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165395#M300522</guid>
      <dc:creator>jpeevy</dc:creator>
      <dc:date>2014-07-03T16:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing cells with 0 counts  in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165396#M300523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the PreloadFMT with proc report:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/239-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/239-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/239-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 16:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165396#M300523</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-07-03T16:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing cells with 0 counts  in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165397#M300524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; In PROC REPORT, you can use COMPLETEROWS or COMPLETECOLS to "complete" columns or rows for which there is no data. For example, there are no age 16 females in SASHELP.CLASS. Consider the difference in the following code in these 3 examples. Output is shown in the screen shot. You can experiment if you are using an ACROSS variable with COMPLETECOLS and PRELOADFMT. Also, you should be sure to set the SAS system option:&lt;/P&gt;&lt;P&gt;options missing=0; to be sure that the usual . for missing appears as 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc format;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; value $sexf 'F' = 'Female'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'M' = 'Male'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'U' = 'Unknown';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\show_0_row.html';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where age ge 14;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '1) without completerows';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column age sex n;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd completerows;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where age ge 14;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '2) with completerows';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column age sex n;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd completerows;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where age ge 14;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '3) with completerows and preloadfmt';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column age sex n;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / group f=$sexf. preloadfmt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11641iA3378B8176976DC2/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="proc_report_row_with_0.png" title="proc_report_row_with_0.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 16:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165397#M300524</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-07-03T16:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing cells with 0 counts  in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165398#M300525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks guys! COMPLETEROWS looks like the way to go&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 21:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Forcing-cells-with-0-counts-in-Proc-Report/m-p/165398#M300525</guid>
      <dc:creator>jpeevy</dc:creator>
      <dc:date>2014-07-03T21:09:06Z</dc:date>
    </item>
  </channel>
</rss>

