<?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: Group statement placement in proc report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775169#M25405</link>
    <description>&lt;P&gt;Thanks Cynthia.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately&amp;nbsp; due to the way that the data is combined, it is displayed per se -that is n=x (%)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie 25,121 (23%)&amp;nbsp; &amp;nbsp;so there is no summation being done by proc report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was more of a general question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time.&amp;nbsp; I can see what tech support can do.&lt;/P&gt;
&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;L&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 16:41:10 GMT</pubDate>
    <dc:creator>LB</dc:creator>
    <dc:date>2021-10-19T16:41:10Z</dc:date>
    <item>
      <title>Group statement placement in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775163#M25402</link>
      <description>&lt;P&gt;Hi all;&lt;/P&gt;
&lt;P&gt;Been awhile since I have used proc reporting/ODS&amp;nbsp; -so a little rusty.&amp;nbsp; This is a general question&amp;nbsp; so no data provided -&lt;/P&gt;
&lt;P&gt;In short I have code that works for the most part -however I have a value&amp;nbsp; below-P_PCHI&lt;/P&gt;
&lt;P&gt;If&amp;nbsp; put at the end (as below) it does not group per se&lt;/P&gt;
&lt;P&gt;(See top pic in&amp;nbsp; document)&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if I put it after another category that is grouped (&lt;CODE class=" language-sas"&gt;category_ods)&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;FONT face="batang,apple gothic"&gt;It&amp;nbsp;does&amp;nbsp;group&amp;nbsp;properly-just&amp;nbsp;not&amp;nbsp;where&amp;nbsp;I want&amp;nbsp;to&amp;nbsp;place&amp;nbsp;it.&amp;nbsp;Is&amp;nbsp;there&amp;nbsp;a&amp;nbsp;way&amp;nbsp;to&amp;nbsp;put&amp;nbsp;it&amp;nbsp;at&amp;nbsp;the&amp;nbsp;end&amp;nbsp;where&amp;nbsp;I want&amp;nbsp;it&amp;nbsp;or&amp;nbsp;do&amp;nbsp;I need&amp;nbsp;to&amp;nbsp;place&amp;nbsp;it&amp;nbsp;with&amp;nbsp;other&amp;nbsp;grouped&amp;nbsp;variables-Thanks&lt;/FONT&gt;&lt;/CODE&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;
proc report data= ODS_out   headline headskip nowd spanrows
style (column)={background=white  just=center color=black font =("arial",7.5pt)}
style (header)={background=#d4af37  just=center color=black font =("arial",8.0pt)};

columns cat_order category_ods  &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;P_PCHI (GROUPING WORKS)&lt;/STRONG&gt;&lt;/FONT&gt;  order1 cat2 &amp;amp;typ1._type &amp;amp;typ2._type &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;P_PCHI ( GROUPING DOES NOT WORK)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000FF"&gt; ;&lt;/FONT&gt;
define cat_order/order noprint ;
define category_ods/group "Table 1. Baseline Characteristics" format=$ODS. width=35;
define order1/order noprint;
define cat2/ ' ';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
define &amp;amp;typ1._type/"&amp;amp;typ1/(&amp;amp;ct1)";
define &amp;amp;typ2._type/"&amp;amp;typ2/(&amp;amp;ct2)";
define P_PCHI/order group "P*";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 16:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775163#M25402</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2021-10-19T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Group statement placement in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775166#M25403</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;Unfortunately, it's hard to comment without data. I do see an issue with your define statement you have "order group" which is unnecessary. GROUP is what you want, I think. And, your macro variables do not have a usage, so my guess is that they are character values and their usage is display by default. But even so, if I try what I think you want using SASHELP.CLASS I don't see the same behavior that you report.&lt;BR /&gt;&lt;BR /&gt;Here's what I mean:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1634661234632.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64854iFE4BFD49912E1494/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1634661234632.png" alt="Cynthia_sas_0-1634661234632.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even when I move AGE to the far right as a GROUP item, PROC REPORT still does spanning rows and grouping.&lt;BR /&gt;&lt;BR /&gt;You might want to try opening a track with Tech Support so they can look at ALL your data, ALL your code, including macro variables and NOPRINT items and see if they can help you.&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 16:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775166#M25403</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-10-19T16:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Group statement placement in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775168#M25404</link>
      <description>&lt;P&gt;You are using a custom format for the variable of interest: category_ods&amp;nbsp; with the format $ODS.&lt;/P&gt;
&lt;P&gt;"group" variables basically define a group for values of analysis variables in columns following (to the right). So I am not sure what you want with a group variable at the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF you don't want to share your data then use one of the SAS data sets to show something similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your images in the document I can't tell what you want. A small example data set along with the desired expected output is helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I might &lt;STRONG&gt;guess&lt;/STRONG&gt; that you do not mean "group" but "I want to display a single value that spans multiple rows as the last column". If that is the case then please say so. At which point we may get into a lot of odd style overrides or similar and possibly restructuring the data set a bit.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 16:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775168#M25404</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-19T16:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Group statement placement in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775169#M25405</link>
      <description>&lt;P&gt;Thanks Cynthia.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately&amp;nbsp; due to the way that the data is combined, it is displayed per se -that is n=x (%)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie 25,121 (23%)&amp;nbsp; &amp;nbsp;so there is no summation being done by proc report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was more of a general question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time.&amp;nbsp; I can see what tech support can do.&lt;/P&gt;
&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;L&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 16:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775169#M25405</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2021-10-19T16:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Group statement placement in proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775171#M25406</link>
      <description>&lt;P&gt;Fair enough not providing data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This&amp;nbsp; was more of a general question.&amp;nbsp; &amp;nbsp;But Cynthia demonstrated to me that the issue is not with ODS limitations but rather my data is the problem . I will see if I can use the sashelp.class data to recreate the data and can I replicate the issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 16:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Group-statement-placement-in-proc-report/m-p/775171#M25406</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2021-10-19T16:48:44Z</dc:date>
    </item>
  </channel>
</rss>

