<?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: Proc Report Summarize in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52547#M6602</link>
    <description>Hi:&lt;BR /&gt;
  Generally, if you use a format in your DEFINE statement, you can have different formats used for different columns.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='c:\temp\summarize.html' style=sasweb;&lt;BR /&gt;
                       &lt;BR /&gt;
proc report data=sashelp.class(obs=5) nowd;&lt;BR /&gt;
  column name sex age height weight;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define sex / display;&lt;BR /&gt;
  define age / sum f=comma10.;&lt;BR /&gt;
  define height / sum f=dollar8.2;&lt;BR /&gt;
  define weight / sum f=dollar8.2;&lt;BR /&gt;
  compute age;&lt;BR /&gt;
    age.sum = age.sum * 10000;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  rbreak after / summarize style=Header;&lt;BR /&gt;
run;&lt;BR /&gt;
                  &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Mon, 18 Apr 2011 17:27:14 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2011-04-18T17:27:14Z</dc:date>
    <item>
      <title>Proc Report Summarize</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52546#M6601</link>
      <description>I have the following piece of code in my proc report&lt;BR /&gt;
&lt;BR /&gt;
rbreak after /summarize;&lt;BR /&gt;
&lt;BR /&gt;
How can I format each of the summarized columns differently...some are dollars, some are counts.&lt;BR /&gt;
&lt;BR /&gt;
Any help is greatly appreciated.</description>
      <pubDate>Mon, 18 Apr 2011 16:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52546#M6601</guid>
      <dc:creator>bilardi</dc:creator>
      <dc:date>2011-04-18T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Summarize</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52547#M6602</link>
      <description>Hi:&lt;BR /&gt;
  Generally, if you use a format in your DEFINE statement, you can have different formats used for different columns.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='c:\temp\summarize.html' style=sasweb;&lt;BR /&gt;
                       &lt;BR /&gt;
proc report data=sashelp.class(obs=5) nowd;&lt;BR /&gt;
  column name sex age height weight;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define sex / display;&lt;BR /&gt;
  define age / sum f=comma10.;&lt;BR /&gt;
  define height / sum f=dollar8.2;&lt;BR /&gt;
  define weight / sum f=dollar8.2;&lt;BR /&gt;
  compute age;&lt;BR /&gt;
    age.sum = age.sum * 10000;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  rbreak after / summarize style=Header;&lt;BR /&gt;
run;&lt;BR /&gt;
                  &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 18 Apr 2011 17:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52547#M6602</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-04-18T17:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Summarize</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52548#M6603</link>
      <description>I'm using tagsets.excelxp as my destination. It does not seem to work.  Would if be different syntax?</description>
      <pubDate>Mon, 18 Apr 2011 20:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52548#M6603</guid>
      <dc:creator>bilardi</dc:creator>
      <dc:date>2011-04-18T20:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Summarize</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52549#M6604</link>
      <description>Hi:&lt;BR /&gt;
  Using the HEADER style for the summary line would be the same syntax using TAGSETS.EXCELXP. If you want Excel to use a different numeric format (other than the default General format) when it opens the XML file, you must use the TAGATTR style attribute to send a MICROSOFT format to Excel from SAS. With my version of TAGSETS.EXCELXP, the dollar formats are respected, but the COMMA format is not respected -- so you would have to use the TAGATTR style attribute to send a Microsoft format:&lt;BR /&gt;
[pre]&lt;BR /&gt;
  define age / sum f=comma10.&lt;BR /&gt;
         style(column)={tagattr="##,###,###"};&lt;BR /&gt;
[/pre]&lt;BR /&gt;
               &lt;BR /&gt;
For more information about Microsoft formats and TAGSETS.EXCELXP, see my SAS Global Forum paper:  &lt;A href="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt;&lt;BR /&gt;
        &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 18 Apr 2011 20:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52549#M6604</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-04-18T20:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Summarize</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52550#M6605</link>
      <description>Thank you so much.  I got the desired output.  I just have one last question. &lt;BR /&gt;
&lt;BR /&gt;
I had defined a style in a PROC TEMPLATE which included a "tagattr" format.  But it wasn't being carried over to the summary.  But it worked fine when I added the style override in the Define statement.  Can you explain why this might happened.&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for your time and help.&lt;BR /&gt;
&lt;BR /&gt;
--Brian</description>
      <pubDate>Tue, 19 Apr 2011 12:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52550#M6605</guid>
      <dc:creator>bilardi</dc:creator>
      <dc:date>2011-04-19T12:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Summarize</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52551#M6606</link>
      <description>Hi:&lt;BR /&gt;
  I don't have a definitive answer about why using TAGATTR didn't work in a style template. I suspect that it's because TAGATTR is generally used with numeric variables only (you are sending a Microsoft &lt;B&gt;number&lt;/B&gt; format using TAGATTR) -- and the TAGATTR value you specified might not have been appropriate for ALL the variables in your report. (TAGATTR would have been wrong for the NAME variable, for example.)&lt;BR /&gt;
 &lt;BR /&gt;
  Everytime I use TAGATTR, I use it in a DEFINE statement (REPORT) or a VAR statement (PRINT) or, with TABULATE, in a TABLE statement using STYLE= overrides. That way, I have the most control over which format is explicitly used for which variable.&lt;BR /&gt;
&lt;BR /&gt;
  If you want to pursue why your style template did not work, you'll have to open a track with Tech Support. When I use the style template below, I do get TAGATTR used, even with character variables in the report.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  idvar = _n_ * 10000;&lt;BR /&gt;
  age = age * 10000;&lt;BR /&gt;
run;&lt;BR /&gt;
                 &lt;BR /&gt;
ods path work.tmp(update) sasuser.templat(update)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
                 &lt;BR /&gt;
proc template;&lt;BR /&gt;
  define style styles.ta;&lt;BR /&gt;
  parent = styles.sasweb;&lt;BR /&gt;
    class data from data/&lt;BR /&gt;
        background=yellow&lt;BR /&gt;
        tagattr="##,###,###";       &lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                  &lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\sum_temp.xls' style=styles.ta;&lt;BR /&gt;
                       &lt;BR /&gt;
proc report data=class(obs=5) nowd;&lt;BR /&gt;
  column idvar age height weight;&lt;BR /&gt;
  define idvar / order;&lt;BR /&gt;
  define age / sum;&lt;BR /&gt;
  define height / sum;&lt;BR /&gt;
  define weight / sum;&lt;BR /&gt;
  rbreak after / summarize style=Header;&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                 &lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\sum_temp_withchar.xls' style=styles.ta;&lt;BR /&gt;
                         &lt;BR /&gt;
proc report data=class(obs=5) nowd;&lt;BR /&gt;
  column idvar name sex age height weight;&lt;BR /&gt;
  define idvar / order;&lt;BR /&gt;
  define name / display;&lt;BR /&gt;
  define sex / display;&lt;BR /&gt;
  define age / sum;&lt;BR /&gt;
  define height / sum;&lt;BR /&gt;
  define weight / sum;&lt;BR /&gt;
  rbreak after / summarize style=Header;&lt;BR /&gt;
run;&lt;BR /&gt;
                    &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 19 Apr 2011 16:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-Summarize/m-p/52551#M6606</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-04-19T16:53:48Z</dc:date>
    </item>
  </channel>
</rss>

