<?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: Column Styles in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35247#M5099</link>
    <description>Hi !&lt;BR /&gt;
As Cynthia would say -- just use proc Report to make your dreams come true.&lt;BR /&gt;
Using the CALL DEFINE statement in a COMPUTE block, you can format a column using the value of other columns -- provided they are &lt;I&gt;on the left&lt;/I&gt; of the column you want to format.&lt;BR /&gt;
[pre]ODS HTML PATH="c:\temp" ;&lt;BR /&gt;
PROC REPORT DATA=sashelp.class NOWD ;&lt;BR /&gt;
  COLUMNS age sex name ;&lt;BR /&gt;
  DEFINE age / DISPLAY ;&lt;BR /&gt;
  DEFINE sex / DISPLAY ;&lt;BR /&gt;
  DEFINE name / DISPLAY ;&lt;BR /&gt;
  COMPUTE name ;&lt;BR /&gt;
    IF age &amp;lt; 15 THEN DO ;&lt;BR /&gt;
      IF sex="F" THEN &lt;BR /&gt;
           CALL DEFINE("name","style","style={background=pink}") ;&lt;BR /&gt;
      ELSE CALL DEFINE("name","style","style={background=cyan}") ;&lt;BR /&gt;
    END ;&lt;BR /&gt;
    ELSE DO ;&lt;BR /&gt;
      IF sex="F" THEN &lt;BR /&gt;
           CALL DEFINE("name","style","style={background=red}") ;&lt;BR /&gt;
      ELSE CALL DEFINE("name","style","style={background=blue}") ;&lt;BR /&gt;
    END ;&lt;BR /&gt;
  ENDCOMP ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
ODS HTML CLOSE ;</description>
    <pubDate>Thu, 31 Jul 2008 07:09:54 GMT</pubDate>
    <dc:creator>Olivier</dc:creator>
    <dc:date>2008-07-31T07:09:54Z</dc:date>
    <item>
      <title>Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35246#M5098</link>
      <description>Hi!&lt;BR /&gt;
&lt;BR /&gt;
Is it possible that a column's style is based on the value of the other columns?&lt;BR /&gt;
&lt;BR /&gt;
example:&lt;BR /&gt;
&lt;BR /&gt;
a table with 5 observations, and 4 columns&lt;BR /&gt;
i want the to change the background color of the 4th column if the difference of column3 and column2 is negative?&lt;BR /&gt;
&lt;BR /&gt;
is that possible?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 31 Jul 2008 03:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35246#M5098</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2008-07-31T03:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35247#M5099</link>
      <description>Hi !&lt;BR /&gt;
As Cynthia would say -- just use proc Report to make your dreams come true.&lt;BR /&gt;
Using the CALL DEFINE statement in a COMPUTE block, you can format a column using the value of other columns -- provided they are &lt;I&gt;on the left&lt;/I&gt; of the column you want to format.&lt;BR /&gt;
[pre]ODS HTML PATH="c:\temp" ;&lt;BR /&gt;
PROC REPORT DATA=sashelp.class NOWD ;&lt;BR /&gt;
  COLUMNS age sex name ;&lt;BR /&gt;
  DEFINE age / DISPLAY ;&lt;BR /&gt;
  DEFINE sex / DISPLAY ;&lt;BR /&gt;
  DEFINE name / DISPLAY ;&lt;BR /&gt;
  COMPUTE name ;&lt;BR /&gt;
    IF age &amp;lt; 15 THEN DO ;&lt;BR /&gt;
      IF sex="F" THEN &lt;BR /&gt;
           CALL DEFINE("name","style","style={background=pink}") ;&lt;BR /&gt;
      ELSE CALL DEFINE("name","style","style={background=cyan}") ;&lt;BR /&gt;
    END ;&lt;BR /&gt;
    ELSE DO ;&lt;BR /&gt;
      IF sex="F" THEN &lt;BR /&gt;
           CALL DEFINE("name","style","style={background=red}") ;&lt;BR /&gt;
      ELSE CALL DEFINE("name","style","style={background=blue}") ;&lt;BR /&gt;
    END ;&lt;BR /&gt;
  ENDCOMP ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
ODS HTML CLOSE ;</description>
      <pubDate>Thu, 31 Jul 2008 07:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35247#M5099</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-07-31T07:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35248#M5100</link>
      <description>Thanks! I'll try this one</description>
      <pubDate>Thu, 31 Jul 2008 07:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35248#M5100</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2008-07-31T07:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35249#M5101</link>
      <description>I am using tagsets.Excelxp with several proc prints to create multiple sheets in one workbook. Can I center some column headings and right justify others within different sheets?? Thanks for the help..</description>
      <pubDate>Thu, 31 Jul 2008 13:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35249#M5101</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-31T13:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35250#M5102</link>
      <description>Hi:&lt;BR /&gt;
  You don't even need to use PROC REPORT for this one. STYLE= overrides work for PROC PRINT in a very similar fashion to the way they work in PROC REPORT.&lt;BR /&gt;
 &lt;BR /&gt;
  When I run this code, I get differing column header justification on the two sheets.&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods tagsets.excelxp file='coljust.xls'&lt;BR /&gt;
    style=sasweb;&lt;BR /&gt;
                              &lt;BR /&gt;
proc print data=sashelp.shoes(obs=2);&lt;BR /&gt;
  where region = 'Asia';&lt;BR /&gt;
  var region / style(header)={just=r};&lt;BR /&gt;
  var sales returns /style(header)={just=l};&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
proc print data=sashelp.shoes(obs=2);&lt;BR /&gt;
  where region = 'Canada';&lt;BR /&gt;
  var product / style(header)={just=c};&lt;BR /&gt;
  var sales returns /style(header)={just=r};&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 31 Jul 2008 13:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35250#M5102</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-07-31T13:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35251#M5103</link>
      <description>Thanks...........I will give it a try..</description>
      <pubDate>Thu, 31 Jul 2008 13:28:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35251#M5103</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-31T13:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35252#M5104</link>
      <description>Listed below is my code. The column justification is not working. Do I need somthing else?? Thanks again..&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.Excelxp file ="P:\daily_split_dep_info_t28.xls" style = statistical&lt;BR /&gt;
                    options (sheet_Name = "Split1" embedded_titles = "yes" frozen_headers = "4");&lt;BR /&gt;
 title1 '*** Deposits Charged and Paid includes the Split Deposit Information ***';&lt;BR /&gt;
 title2 '*** Deposits Paid Includes Move Ins, Switch On Cycle, and Switch Off Cycle';&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data = work.sum_dep noobs label split = '*';&lt;BR /&gt;
var week_day / style(header)={just=c} style(data)={font_face = arial font_weight = bold just=c};&lt;BR /&gt;
var source_date / style={just=c};&lt;BR /&gt;
var _freq_ / style={just=r};&lt;BR /&gt;
var tot_dep_chg / style(header)={just=r};&lt;BR /&gt;
var tot_dep_pd / style(header)={just=r};&lt;BR /&gt;
var tot_dep_not_pd / style(header)={just=r};&lt;BR /&gt;
var tot_split_dep / style(header)={just=r};&lt;BR /&gt;
var tot_split_dep_pd / style(header)={just=r};&lt;BR /&gt;
var tot_split_dep_not_pd / style(header)={just=r};&lt;BR /&gt;
label week_day = 'Day of Week';&lt;BR /&gt;
label source_date = 'Date';&lt;BR /&gt;
label _freq_ = 'Enrollments';&lt;BR /&gt;
label tot_dep_chg = 'Dep*Charged';&lt;BR /&gt;
label tot_dep_pd = 'Dep*Paid';&lt;BR /&gt;
label tot_dep_not_pd = 'Dep Not*Pd';&lt;BR /&gt;
label tot_split_dep  =  'Split*Dep';&lt;BR /&gt;
label tot_split_dep_pd  =  'Split Dep*Pd';&lt;BR /&gt;
label tot_split_dep_not_pd  = 'Split Dep*Not Pd';&lt;BR /&gt;
where _type_ = 3;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;</description>
      <pubDate>Thu, 31 Jul 2008 17:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35252#M5104</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-31T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Column Styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35253#M5105</link>
      <description>Hi:&lt;BR /&gt;
  I'm not sure what's happening. In my example, the column HEADINGS are right justified where I set Just=r and left justified where I set Just=l and center justified where I set Just=c. There's a difference between justifying the HEADER for the column (the header would be the label, like 'Date' or 'Enrollments' or 'Dep*Charged') and the data cells in a column. STYLE(HEADER) will only justify the column HEADER. That's what I see. For example, using the latest tagset for ExcelXP, I see headers justifying where I expect them to. For some of my columns, I did have to drag the edge of the column wider to make sure that I was seeing center vs left vs right justify.&lt;BR /&gt;
&lt;BR /&gt;
  Perhaps your best bet for help with this question is to open a question with Tech Support. They'll probably ask whether you have the latest version of the ExcelXP tagset. On this site, it indicates that the latest version of the tagset is from April 2008:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/&lt;/A&gt; (middle of the page)&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 31 Jul 2008 19:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Column-Styles/m-p/35253#M5105</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-07-31T19:53:57Z</dc:date>
    </item>
  </channel>
</rss>

