<?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: FORMAT IN PROC REPORT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37322#M9497</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; Just curious...in your data and your original post, the value was #Ach (capital A), yet in your IF statement, you use %ach for the comparison (lowercase a). Which one is it, comparisons are case sensitive??? Also, you spelled "group" in the DEFINE statement as GROPU -- is this a typo?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Remember that, by default, PROC REPORT does not display repeating values on every row. So on the first row for each SOURCE, PROC REPORT displays a value for the SOURCE column. But, on subsequent rows, PROC REPORT displays a space for SOURCE. Since it is this displayed value that you are testing, you only know what the FIRST value for SOURCE is. You will probably need to grab the value of SOURCE before the display of the group begins. You can do this easily in a COMPUTE block. The temporary item HOLDSRC, in my code, is a temporary item whose value will be assigned for the first SOURCE of each group, and then automatically retained across all the rows for the same SOURCE value. This means that you will also need to change your IF statements to reference HOLDSRC instead of SOURCE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; In addition, with "%Ach" in double quotes, you are probably seeing this note in the SAS log:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WARNING: Apparent invocation of macro ACH not resolved.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which you can fix by just using '%Ach' -- with single quotes instead. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The changed code below shows the recommended changes.&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;title; footnote;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html body="C:\temp\use_percent.html";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=test nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column source group apr11 may11 jun11 jul11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define source/group order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define group/group order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define apr11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define may11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define jun11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define jul11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute before source;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; holdsrc = source;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute apr11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute may11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute jun11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute jul11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&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;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jan 2012 03:37:02 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2012-01-25T03:37:02Z</dc:date>
    <item>
      <title>FORMAT IN PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37319#M9494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 384px;"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl64" height="17" style="height: 12.75pt; width: 48pt;" width="64"&gt;&lt;STRONG&gt;source&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none; width: 48pt;" width="64"&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none; width: 48pt;" width="64"&gt;&lt;STRONG&gt;Apr'11&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none; width: 48pt;" width="64"&gt;&lt;STRONG&gt;May'11&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none; width: 48pt;" width="64"&gt;&lt;STRONG&gt;Jun'11&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none; width: 48pt;" width="64"&gt;&lt;STRONG&gt;Jul'11&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl63" height="17" style="height: 12.75pt; border-top: none;"&gt;Stock&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;North&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl63" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;South&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl63" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;East&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl63" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;West&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;Target&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;North&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;South&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;East&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;West&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3500&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4500&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;Ach&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;North&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;South&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;700&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;700&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;700&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;700&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;East&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;850&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;850&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;850&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;850&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;West&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;925&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;925&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;925&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;925&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;%Ach&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;North&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.666667&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.285714&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.222222&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;South&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.466667&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.28&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.155556&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;East&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.566667&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.34&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.242857&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.188889&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: none;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;West&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.616667&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.37&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.264286&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;0.205556&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;Hi&lt;/P&gt;&lt;P&gt; i am created above report by using proc report.&lt;/P&gt;&lt;P&gt; i am trying to give percent10.2 format to Apr'11 may'11,jun'11,jul'11 variables where soure="%ach",but i am not getting the correct logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one provide solution for this....???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:i want to do this in proc report only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 17:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37319#M9494</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-01-24T17:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT IN PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37320#M9495</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; This is probably beter posted in the ODS and Reporting Forum, but PROC REPORT is a SAS Procedure, so here goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; First, what you want to do is very possible using a call define of the form:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;CALL DEFINE(_col_,'format','percent10.2'); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;CALL DEFINE('_Cn_','format','percent10.2');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;in a COMPUTE block. You can test the value of other variables in order to accomplish the formatting change. However, the referencing method you use can depend on your code. (are you using ACROSS variables, are you using simple variables in the COLUMN statement?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So, can you post your PROC REPORT code, including ODS statements? Also useful would be a small sample of the data or some fake data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 19:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37320#M9495</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-01-24T19:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT IN PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37321#M9496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please find the bellow data and code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input source $&amp;nbsp;&amp;nbsp;&amp;nbsp; group$&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr11&amp;nbsp;&amp;nbsp;&amp;nbsp; May11&amp;nbsp;&amp;nbsp;&amp;nbsp; Jun11&amp;nbsp;&amp;nbsp;&amp;nbsp; Jul11;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;Stock&amp;nbsp;&amp;nbsp;&amp;nbsp; North&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stock&amp;nbsp;&amp;nbsp;&amp;nbsp; South&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stock&amp;nbsp;&amp;nbsp;&amp;nbsp; East&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stock&amp;nbsp;&amp;nbsp;&amp;nbsp; West&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target&amp;nbsp;&amp;nbsp;&amp;nbsp; North&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target&amp;nbsp;&amp;nbsp;&amp;nbsp; South&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target&amp;nbsp;&amp;nbsp;&amp;nbsp; East&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target&amp;nbsp;&amp;nbsp;&amp;nbsp; West&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500&amp;nbsp;&amp;nbsp;&amp;nbsp; 2500&amp;nbsp;&amp;nbsp;&amp;nbsp; 3500&amp;nbsp;&amp;nbsp;&amp;nbsp; 4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; North&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; South&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; East&amp;nbsp;&amp;nbsp;&amp;nbsp; 850&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 850&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 850&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 850&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; West&amp;nbsp;&amp;nbsp;&amp;nbsp; 925&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 925&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 925&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 925&lt;/P&gt;&lt;P&gt;%Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; North&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.666667&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.4&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.285714&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.222222&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; South&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.466667&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.28&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.2&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.155556&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; East&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.566667&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.34&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.242857&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.188889&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Ach&amp;nbsp;&amp;nbsp;&amp;nbsp; West&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.616667&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.37&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.264286&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.205556&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html body="C:\Users\sanjeev\Desktop\file.html";&lt;/P&gt;&lt;P&gt;proc report data=test;&lt;/P&gt;&lt;P&gt;column source group apr11 may11 jun11 jul11;&lt;/P&gt;&lt;P&gt;define source/group;&lt;/P&gt;&lt;P&gt;define gropu/group;&lt;/P&gt;&lt;P&gt;define apr11/analysis;&lt;/P&gt;&lt;P&gt;define may11/analysis;&lt;/P&gt;&lt;P&gt;define jun11/analysis;&lt;/P&gt;&lt;P&gt;define jul11/analysis;&lt;/P&gt;&lt;P&gt;compute apr11;&lt;/P&gt;&lt;P&gt;if source="%ach" then do;&lt;/P&gt;&lt;P&gt;call define(_col_,'format','percent10.2');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;compute may11;&lt;/P&gt;&lt;P&gt;if source="%ach" then do;&lt;/P&gt;&lt;P&gt;call define(_col_,'format','percent10.2');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;compute jun11;&lt;/P&gt;&lt;P&gt;if source="%ach" then do;&lt;/P&gt;&lt;P&gt;call define(_col_,'format','percent10.2');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;compute jul11;&lt;/P&gt;&lt;P&gt;if source="%ach" then do;&lt;/P&gt;&lt;P&gt;call define(_col_,'format','percent10.2');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html close;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 02:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37321#M9496</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-01-25T02:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT IN PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37322#M9497</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; Just curious...in your data and your original post, the value was #Ach (capital A), yet in your IF statement, you use %ach for the comparison (lowercase a). Which one is it, comparisons are case sensitive??? Also, you spelled "group" in the DEFINE statement as GROPU -- is this a typo?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Remember that, by default, PROC REPORT does not display repeating values on every row. So on the first row for each SOURCE, PROC REPORT displays a value for the SOURCE column. But, on subsequent rows, PROC REPORT displays a space for SOURCE. Since it is this displayed value that you are testing, you only know what the FIRST value for SOURCE is. You will probably need to grab the value of SOURCE before the display of the group begins. You can do this easily in a COMPUTE block. The temporary item HOLDSRC, in my code, is a temporary item whose value will be assigned for the first SOURCE of each group, and then automatically retained across all the rows for the same SOURCE value. This means that you will also need to change your IF statements to reference HOLDSRC instead of SOURCE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; In addition, with "%Ach" in double quotes, you are probably seeing this note in the SAS log:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WARNING: Apparent invocation of macro ACH not resolved.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which you can fix by just using '%Ach' -- with single quotes instead. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The changed code below shows the recommended changes.&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;title; footnote;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html body="C:\temp\use_percent.html";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=test nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column source group apr11 may11 jun11 jul11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define source/group order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define group/group order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define apr11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define may11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define jun11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define jul11/analysis;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute before source;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; holdsrc = source;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute apr11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute may11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute jun11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute jul11;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if holdsrc='%Ach' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_col_,'format','percent10.2');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&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;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 03:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37322#M9497</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-01-25T03:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT IN PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37323#M9498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you...its working...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more thing..&lt;/P&gt;&lt;P&gt;if the value of apr or may or jun in %ach is less then 50%, i want to blink that values...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 03:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37323#M9498</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-01-26T03:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT IN PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37324#M9499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;If you want to "blank" the values ( change the value from a number to having a space displayed) when the value meets or doesn't meet a condition, you can do that with more IF logic in your COMPUTE block. You will have to remember 2 things:&lt;/P&gt;&lt;P&gt;1) missing values for numeric items are a period or dot . -- so if you want to assign the value of missing to a numeric column, you will need this option to display missing as blank:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;options missing=' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;2) when you use ANALYSIS as the usage for a column, the default statistic is SUM. So, in a COMPUTE block, you cannot reference the simple item or column name (such as APR11) , you would have to use the "compound" name that PROC REPORT expects for an ANALYSIS item. For a column like APR11, with a usage of ANALYSIS and the SUM statistic as the default, the compound name would be APR11.SUM (There are other rules for referencing, such as if you have ACROSS items -- but you don't, so I won't mention them here.) Do note, that if you had a different statistic on the DEFINE statement for AGE (such as MEAN, for example), then the compound name would be different (such as AGE.MEAN). If you do not use the correct compound name in your COMPUTE block, you will get a message about an unitialized variable in the SAS log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The code below using SASHELP.CLASS, changes Alfred's height to 999. It also changes Barbara's age to missing and Alice's weight to missing. Then because of the OPTIONS statement, the missing is displayed as blank in the output.&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;options missing = ' ';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\blankval.html';&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; &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; column name age sex height weight;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / analysis;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define height / sum analysis;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define weight / sum;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute age;&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; if name = 'Barbara' then do;&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; age.sum = .;&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; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute height;&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; if name = 'Alfred' then do;&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; height.sum = 999;&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; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute weight;&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; if name = 'Alice' then do;&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; weight.sum = .;&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; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&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;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;options missing = .;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 14:54:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FORMAT-IN-PROC-REPORT/m-p/37324#M9499</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-01-26T14:54:25Z</dc:date>
    </item>
  </channel>
</rss>

