<?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 sas proc report in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283546#M19409</link>
    <description>&lt;P&gt;hi all&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am new to sas and using SAS EG&lt;/P&gt;&lt;P&gt;i am trying to do two things using proc report&lt;/P&gt;&lt;P&gt;my data is following&lt;/P&gt;&lt;P&gt;h1 | rgu&lt;/P&gt;&lt;P&gt;sales |&amp;nbsp;700&lt;/P&gt;&lt;P&gt;wow | .5&lt;/P&gt;&lt;P&gt;what i want to do is format alignment of h1 column that if value is sales then align to right, if value is wow then align h1 column to left.&lt;/P&gt;&lt;P&gt;also i am able to change the wow rgu value to percent but how do i color it to red if negative and green if positive.&lt;/P&gt;&lt;P&gt;any suggestions would help&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jul 2016 17:18:53 GMT</pubDate>
    <dc:creator>amar8580</dc:creator>
    <dc:date>2016-07-11T17:18:53Z</dc:date>
    <item>
      <title>sas proc report</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283546#M19409</link>
      <description>&lt;P&gt;hi all&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am new to sas and using SAS EG&lt;/P&gt;&lt;P&gt;i am trying to do two things using proc report&lt;/P&gt;&lt;P&gt;my data is following&lt;/P&gt;&lt;P&gt;h1 | rgu&lt;/P&gt;&lt;P&gt;sales |&amp;nbsp;700&lt;/P&gt;&lt;P&gt;wow | .5&lt;/P&gt;&lt;P&gt;what i want to do is format alignment of h1 column that if value is sales then align to right, if value is wow then align h1 column to left.&lt;/P&gt;&lt;P&gt;also i am able to change the wow rgu value to percent but how do i color it to red if negative and green if positive.&lt;/P&gt;&lt;P&gt;any suggestions would help&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 17:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283546#M19409</guid>
      <dc:creator>amar8580</dc:creator>
      <dc:date>2016-07-11T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc report</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283650#M19419</link>
      <description>&lt;P&gt;Hi, and welcome to the SAS community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC REPORT is an amazing tool, but to be honest it's a challenge for new users. I've just climbed that learning curve because of a new project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pretty sure what you want can be fairly easily done using PROC REPORT, and probably not with anything else, but I don't have the time to go through the trial-and-error to figure it out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pretty sure you'll want to use the STYLE features in PROC REPORT. I can suggest two things:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This link show an example of using PROC REPORT to change style elements; in particular, check out the "compute sales" block, where the characteristics of data are used to change the style of the cell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000545547.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000545547.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The other thing I do is google furiously for the result I'm trying to get. There are some amazing papers out there where PROC REPORT experts show how to accomplish these tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One last comment; I'm fairly sure you won't be able to get your result using the "List Report" task, you'll most likely have to write SAS code to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283650#M19419</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-07-12T01:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: sas proc report</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283654#M19420</link>
      <description>&lt;P&gt;You should post it at&amp;nbsp;&lt;A class="" href="https://communities.sas.com/t5/ODS-and-Base-Reporting/bd-p/ods_base_reporting" target="_blank"&gt;ODS and Base Reporting&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input h1 $ rgu;
cards;
sales   700
wow   .5
wwe   -.5
;
run;

proc format;
value fmt
 low-&amp;lt;0='red'
 0-high='green';
run;



proc report data=have nowd;
columns h1 rgu;
define h1/display style={cellwidth=40};
define rgu/display style={backgroundcolor=fmt.};
compute h1;
 if h1='sales' then call define(_col_,'style','style={just=right}');
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3999iD462627D21884CC6/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="x.png" title="x.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sas-proc-report/m-p/283654#M19420</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-12T01:34:26Z</dc:date>
    </item>
  </channel>
</rss>

