<?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 PROC REPORT:  Repeating Group and Order Variables on Each Row in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28405#M6596</link>
    <description>I have a need to include the group variable on each row of a report, because one of my end users is confused with the present format.  I tried reading about this issue in Carpenter's Complete Guide on the SAS Report Pocedure, and I understand his example using the compute block to assign the formated value of group variable to a temporary variable, then moving that temporary variable to a report item.  The trouble is applying that technique to some inherited code that is more complex than the example in the book.&lt;BR /&gt;
&lt;BR /&gt;
Is there another "work-around" option for this problem?</description>
    <pubDate>Thu, 27 May 2010 19:57:20 GMT</pubDate>
    <dc:creator>chandler</dc:creator>
    <dc:date>2010-05-27T19:57:20Z</dc:date>
    <item>
      <title>PROC REPORT:  Repeating Group and Order Variables on Each Row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28405#M6596</link>
      <description>I have a need to include the group variable on each row of a report, because one of my end users is confused with the present format.  I tried reading about this issue in Carpenter's Complete Guide on the SAS Report Pocedure, and I understand his example using the compute block to assign the formated value of group variable to a temporary variable, then moving that temporary variable to a report item.  The trouble is applying that technique to some inherited code that is more complex than the example in the book.&lt;BR /&gt;
&lt;BR /&gt;
Is there another "work-around" option for this problem?</description>
      <pubDate>Thu, 27 May 2010 19:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28405#M6596</guid>
      <dc:creator>chandler</dc:creator>
      <dc:date>2010-05-27T19:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT:  Repeating Group and Order Variables on Each Row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28406#M6597</link>
      <description>One possibility is to summarise and order your data first using the MEANS/SUMMARY and SORT procedures then define your ORDER and GROUP variables as DISPLAY instead.</description>
      <pubDate>Thu, 27 May 2010 23:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28406#M6597</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2010-05-27T23:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT:  Repeating Group and Order Variables on Each Row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28407#M6598</link>
      <description>Hi:&lt;BR /&gt;
  If you are dealing with inherited code and you do not want to try to fiddle with it, you do not have a lot of options. The technique shown in Carpenter's book is essentially the technique you will need to use. Another possibility is to pre-summarize the data, as suggested. Yet another option would be to make a "fake" variable in a DATA step program,  which would be a duplication of the group or order variable, but you would use if for DISPLAY -- there's an example of this technique shown below.&lt;BR /&gt;
&lt;BR /&gt;
If you don't want to pre-summarize the data or fiddle with the existing code or use the DATA step technique, then another possible option is to open a track with Tech Support. They will be able to look at your existing code and your data and help you figure out the best way/place to change the existing program.&lt;BR /&gt;
 &lt;BR /&gt;
  To open a track with Tech Support, go to:&lt;BR /&gt;
&lt;A href="http://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;http://support.sas.com/ctx/supportform/createForm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
** make DISPLAY_AGE and DISPLAY_SEX in a program instead of a ;&lt;BR /&gt;
** COMPUTE BLOCK.;&lt;BR /&gt;
   &lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  where age in (12, 13);&lt;BR /&gt;
  display_age = age;&lt;BR /&gt;
  display_sex = sex;&lt;BR /&gt;
run;&lt;BR /&gt;
              &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file='show_other_alt.html' style=sasweb;&lt;BR /&gt;
            &lt;BR /&gt;
proc report data=class nowd;&lt;BR /&gt;
  title '1) Default ORDER Usage Behavior';&lt;BR /&gt;
  column age sex name height weight;&lt;BR /&gt;
  define age /order;&lt;BR /&gt;
  define sex / order;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define height /display;&lt;BR /&gt;
  define weight / display;&lt;BR /&gt;
  compute after age;&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
                       &lt;BR /&gt;
proc report data=class nowd;&lt;BR /&gt;
  title '2a) Using Display_Age and Display_Sex Variables';&lt;BR /&gt;
  column age sex display_age display_sex name height weight;&lt;BR /&gt;
  define age /order;&lt;BR /&gt;
  define sex / order;&lt;BR /&gt;
  define display_age / display 'Age';&lt;BR /&gt;
  define display_sex / display 'Sex';&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define height /display;&lt;BR /&gt;
  define weight / display;&lt;BR /&gt;
  compute after age;&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
                              &lt;BR /&gt;
proc report data=class nowd;&lt;BR /&gt;
  title '2b) Using Display_Age and Display_Sex Variables with NOPRINT';&lt;BR /&gt;
  column age sex display_age display_sex name height weight;&lt;BR /&gt;
  define age /order noprint;&lt;BR /&gt;
  define sex / order noprint;&lt;BR /&gt;
  define display_age / display 'Age';&lt;BR /&gt;
  define display_sex / display 'Sex';&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define height /display;&lt;BR /&gt;
  define weight / display;&lt;BR /&gt;
  compute after age;&lt;BR /&gt;
    line ' ';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 28 May 2010 01:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28407#M6598</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-28T01:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT:  Repeating Group and Order Variables on Each Row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28408#M6599</link>
      <description>Hi . Take a look this.&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=9790&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=9790&amp;amp;tstart=0&lt;/A&gt;</description>
      <pubDate>Fri, 28 May 2010 01:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-Repeating-Group-and-Order-Variables-on-Each-Row/m-p/28408#M6599</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-05-28T01:43:13Z</dc:date>
    </item>
  </channel>
</rss>

