<?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: using formats with styles in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120430#M10412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am not sure what you mean when you ask "against a style" -- I guess you mean a style template? The STYLE statement that you show:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;style colormis from data/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tagattr='type:numeric format=f4.0'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreground=format(colormis.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would you envision using the COLORMIS style element? Even if you make a custom style element, you have to link the custom style element to your report item in a style override. I don't usually specify TAGATTR or FOREGROUND in my style template, if I am doing trafficlighting because the STYLE template is supposed to be "data neutral" -- it is used for ANY data--if you used this style template, for example with a data set of names, addresses, cities and states, then it would be inappropriate to use the COLORMIS style element (with your TAGATTR of numeric) with your character variables. So then you'd need a different style template for the tables where you didn't want to use COLORMIS or used a different COLORMIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You should be getting an error on your TAGATTR specification, anyway. The method of specifying formats is to use type: and format: (not format=). See this Tech Support note for examples of FORMAT:&amp;nbsp; &lt;A href="http://support.sas.com/kb/38/105.html" title="http://support.sas.com/kb/38/105.html"&gt;38105 - How can I control the formatting of my output when exporting output to Excel using ODS?&lt;/A&gt; And to use TYPE: and FORMAT: together, you need to be careful about using the right syntax. Usually, if the format or type is bad, excel won't open the file and will complain. And, you have to use an Excel format, not a SAS format. Are you sure that F4.0 is an Excel format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my SAS Global Forum paper, on page 8, I show how to format both positive and negative numbers using Excel custom format syntax. I do not recall F4.0 being an Excel format when I was researching my paper. &lt;A href="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There are 2 basic ways to do color coding (traffic lighting) with the reporting procedures, Excel just adds an extra twist into the mix #3 below.&lt;BR /&gt;1) Use traffic-lighting in PRINT, REPORT and TABULATE with a user-defined format and a STYLE= override (HTML, RTF, PDF, EXCELXP)&lt;/P&gt;&lt;P&gt;2) Do traffic-lighting in PROC REPORT using CALL DEFINE (with or without a user-defined format) in a COMPUTE block (HTML,RTF, PDF, EXCELXP)&lt;/P&gt;&lt;P&gt;3) If your DESTINATION is MSOFFICE2K or EXCELXP, use STYLE= overrides to pass a Microsoft format directly from SAS to Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; A style template is not one of the "basic" ways. I would not use a style template for "data-specific" values. It is too hard to implement, nearly impossible. The code below works for me, once I make some fake numbers for the report. I would not use a style template for this. Remember that a style template could be used with PROC REG or PROC GLM or PROC UNIVARIATE -- none of those procedures would support trafficlighting the way you want to implement it. A style template has visibility of the main elements on the report (title, column headers, data cells, etc), but think of the style template as not being able to "see down" into the data values on te report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There may be some changes to style templates in the future that would allow visibility of data values using more CSS-like syntax, but I would not count on that for what you want to do today. The program below illustrates output tailored for Excel. It uses the Microsoft format in #1 example below for the minus sign and number of decimal places, but a SAS format for the colors. #2 example below uses a Microsoft format for EVERYTHING. This means that no other destination would receive color changes for these items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc format; &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; value colormis low-0='black' 0-high='red';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** make some fake data with 0 for some values;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data class;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set sashelp.class;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; fakenum = ranuni(0);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; if sex = 'M' then fakenum = fakenum*10;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; else if sex = 'F' then fakenum=fakenum*-1;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; if name in ('Joyce', 'Barbara', 'Alice','Janet')&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then fakenum = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp file='c:\temp\test_colormis.xml'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style=sasweb;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=class nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** Use Format for FAKENUM column;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column ('1) Use SAS format for color, Excel TAGATTR for negative' age name sex fakenum);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define fakenum / display &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='format:#,##0.000;-#,##0.000;#,##0.0;' foreground=colormis.};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=class nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** Use Excel coding for FAKENUM column;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column ('2) Use Excel format for color and decimals -- 0 is blue' age name sex fakenum);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define fakenum / display &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='format:[Red]#,##0.000;[Black]-#,##0.000;[Blue]#,##0.000;'};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp 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;cynthia&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jun 2013 02:34:39 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2013-06-27T02:34:39Z</dc:date>
    <item>
      <title>using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120429#M10411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have another question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a proc format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value colormis low-0='black' 0-high='red';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value colorstd low- -.1='green' -.1-.25='black' .25-high='red';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value mispoint low-1='black' 1-2='red'&amp;nbsp; 2-high='red';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value countpoint low-1='black' 1-2='red' 2-high='red';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to apply a format against a style?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style colormis from data/&amp;nbsp; tagattr='type:numeric format=f4.0' foreground=format(colormis.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to be able to do traffic lighting on the cells in excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example I was using the define statement define countmissing /'Visits*With*No Data' style={foreground=colormis.}; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to color code cells based on the value&lt;/P&gt;&lt;DIV id="__tbSetup"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 22:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120429#M10411</guid>
      <dc:creator>wkossack_nspirehealth_com</dc:creator>
      <dc:date>2013-06-26T22:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120430#M10412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am not sure what you mean when you ask "against a style" -- I guess you mean a style template? The STYLE statement that you show:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;style colormis from data/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tagattr='type:numeric format=f4.0'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreground=format(colormis.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would you envision using the COLORMIS style element? Even if you make a custom style element, you have to link the custom style element to your report item in a style override. I don't usually specify TAGATTR or FOREGROUND in my style template, if I am doing trafficlighting because the STYLE template is supposed to be "data neutral" -- it is used for ANY data--if you used this style template, for example with a data set of names, addresses, cities and states, then it would be inappropriate to use the COLORMIS style element (with your TAGATTR of numeric) with your character variables. So then you'd need a different style template for the tables where you didn't want to use COLORMIS or used a different COLORMIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You should be getting an error on your TAGATTR specification, anyway. The method of specifying formats is to use type: and format: (not format=). See this Tech Support note for examples of FORMAT:&amp;nbsp; &lt;A href="http://support.sas.com/kb/38/105.html" title="http://support.sas.com/kb/38/105.html"&gt;38105 - How can I control the formatting of my output when exporting output to Excel using ODS?&lt;/A&gt; And to use TYPE: and FORMAT: together, you need to be careful about using the right syntax. Usually, if the format or type is bad, excel won't open the file and will complain. And, you have to use an Excel format, not a SAS format. Are you sure that F4.0 is an Excel format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my SAS Global Forum paper, on page 8, I show how to format both positive and negative numbers using Excel custom format syntax. I do not recall F4.0 being an Excel format when I was researching my paper. &lt;A href="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There are 2 basic ways to do color coding (traffic lighting) with the reporting procedures, Excel just adds an extra twist into the mix #3 below.&lt;BR /&gt;1) Use traffic-lighting in PRINT, REPORT and TABULATE with a user-defined format and a STYLE= override (HTML, RTF, PDF, EXCELXP)&lt;/P&gt;&lt;P&gt;2) Do traffic-lighting in PROC REPORT using CALL DEFINE (with or without a user-defined format) in a COMPUTE block (HTML,RTF, PDF, EXCELXP)&lt;/P&gt;&lt;P&gt;3) If your DESTINATION is MSOFFICE2K or EXCELXP, use STYLE= overrides to pass a Microsoft format directly from SAS to Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; A style template is not one of the "basic" ways. I would not use a style template for "data-specific" values. It is too hard to implement, nearly impossible. The code below works for me, once I make some fake numbers for the report. I would not use a style template for this. Remember that a style template could be used with PROC REG or PROC GLM or PROC UNIVARIATE -- none of those procedures would support trafficlighting the way you want to implement it. A style template has visibility of the main elements on the report (title, column headers, data cells, etc), but think of the style template as not being able to "see down" into the data values on te report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There may be some changes to style templates in the future that would allow visibility of data values using more CSS-like syntax, but I would not count on that for what you want to do today. The program below illustrates output tailored for Excel. It uses the Microsoft format in #1 example below for the minus sign and number of decimal places, but a SAS format for the colors. #2 example below uses a Microsoft format for EVERYTHING. This means that no other destination would receive color changes for these items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc format; &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; value colormis low-0='black' 0-high='red';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** make some fake data with 0 for some values;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data class;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set sashelp.class;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; fakenum = ranuni(0);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; if sex = 'M' then fakenum = fakenum*10;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; else if sex = 'F' then fakenum=fakenum*-1;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; if name in ('Joyce', 'Barbara', 'Alice','Janet')&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then fakenum = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp file='c:\temp\test_colormis.xml'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style=sasweb;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=class nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** Use Format for FAKENUM column;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column ('1) Use SAS format for color, Excel TAGATTR for negative' age name sex fakenum);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define fakenum / display &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='format:#,##0.000;-#,##0.000;#,##0.0;' foreground=colormis.};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=class nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** Use Excel coding for FAKENUM column;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column ('2) Use Excel format for color and decimals -- 0 is blue' age name sex fakenum);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define fakenum / display &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='format:[Red]#,##0.000;[Black]-#,##0.000;[Blue]#,##0.000;'};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp 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;cynthia&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 02:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120430#M10412</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-06-27T02:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120431#M10413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of changing my proc print to a proc report on my way home.&amp;nbsp; This is another case of something that worked in 9.2 that does not in 9.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll tackle it in the morning with a fresh brain&lt;/P&gt;&lt;DIV id="__tbSetup"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 02:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120431#M10413</guid>
      <dc:creator>wkossack_nspirehealth_com</dc:creator>
      <dc:date>2013-06-27T02:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120432#M10414</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; Are you saying that you had a STYLE= override that worked in PROC PRINT in 9.2 that doesn't work in 9.3, then that would be something to bring to the attention of Tech Support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; However, I do not see how your style template approach would ever have worked in 9.2 or 9.3. As you coded this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;style colormis from data/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tagattr='type:numeric format=f4.0'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreground=format(colormis.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it would not have worked in either 9.2 or 9.3. So I'm confused about exactly WHAT worked in 9.2 that doesn't work in 9.3. There is syntax for a TABLE template that you might have tried in the past, but PROC PRINT doesn't use a TABLE template and the syntax snippet that you showed is STYLE template syntax. Since you didn't show any other code, it is impossible to comment or offer suggestions. In order to help anyone help you, it is important to see all your code. If you don't want to share code or data because it is proprietary or confidential, then use a SASHELP dataset to illustrate the problem/question.&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;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 14:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120432#M10414</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-06-27T14:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120433#M10415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=class nowd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ** Use Format for FAKENUM column;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column ('1) Use SAS format for color, Excel TAGATTR for negative' age name sex fakenum);&lt;/P&gt;&lt;P&gt;&amp;nbsp; define age / order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define name / order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define sex / display;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define fakenum / display&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='format:#,##0.000;-#,##0.000;#,##0.0;' foreground=colormis.};&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;proc report data=class nowd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ** Use Excel coding for FAKENUM column;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column ('2) Use Excel format for color and decimals -- 0 is blue' age name sex fakenum);&lt;/P&gt;&lt;P&gt;&amp;nbsp; define age / order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define name / order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define sex / display;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define fakenum / display&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='format:[Red]#,##0.000;[Black]-#,##0.000;[Blue]#,##0.000;'};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it returned&lt;/P&gt;&lt;P&gt;WARNING: In Event: style_over_ride, Invalid Expression:&lt;/P&gt;&lt;P&gt;ERROR: WHERE clause operator requires numeric variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="__tbSetup"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 15:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120433#M10415</guid>
      <dc:creator>wkossack_nspirehealth_com</dc:creator>
      <dc:date>2013-06-27T15:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120434#M10416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it working with the help from Chevell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem with old code is that there can be a bunch of old included code.&amp;nbsp; We found where an old 9.2 template was hard coded in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once that was done the approach using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value colormis low-0='black' 0-high='red';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value colorstd low- -.1='green' -.1-.25='black'&amp;nbsp;&amp;nbsp; .25-high='red';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value mispoint low-1='black' 1-2='red'&amp;nbsp; 2-high='red';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value countpoint low-1='black' 1-2='red'&amp;nbsp; 2-high='red';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define missing /'Missing*Time*Point' style=[foreground=mispoint.];&lt;/P&gt;&lt;P&gt;define LTF_4 /'Visit*4*Stopped'&amp;nbsp; format=f4.0 style=[foreground=colormis.];&lt;/P&gt;&lt;P&gt;define LTF_8 /'Visit*8*Stopped'&amp;nbsp; format=f4.0 style=[foreground=colormis.];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;worked&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 16:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120434#M10416</guid>
      <dc:creator>wkossack_nspirehealth_com</dc:creator>
      <dc:date>2013-06-27T16:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: using formats with styles</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120435#M10417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ah left out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;style mispoint from data/&amp;nbsp; foreground=mispoint.;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style colormis from data/&amp;nbsp; tagattr='type:numeric format=f4.0' foreground=colormis.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style countpoint from data/ tagattr='type:numeric format=f4.0' foreground=countpoint.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; style colorstd from data / tagattr='type:numeric format=f4.2' foreground=colorstd.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually the format in the define is not needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 17:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formats-with-styles/m-p/120435#M10417</guid>
      <dc:creator>wkossack_nspirehealth_com</dc:creator>
      <dc:date>2013-06-27T17:16:49Z</dc:date>
    </item>
  </channel>
</rss>

