<?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: help required with proc report. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/help-required-with-proc-report/m-p/65048#M18521</link>
    <description>Hi:&lt;BR /&gt;
  Using a COMPUTED column, you can make a variable that will display on each row of your group. For example, REGION is the GROUP variable in the following report. It will have repetitious values suppressed on every report row for Asia and Canada.&lt;BR /&gt;
     &lt;BR /&gt;
  However, the computed report item, DISPREG is a report column that will hold and display the value for each region. You can still make REGION a group variable, but then use the NOPRINT option so that it is not displayed on the report. But, DISPREG will be displayed on every line of the report, because you assign it the value of a temporary variable HOLDREG, which you grab from REGION on the first row of every group (when REGION has a value).&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sort data=sashelp.shoes out=shoes;&lt;BR /&gt;
  where region in ('Asia', 'Canada');&lt;BR /&gt;
  by region;&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
ods html file='seegroup.html' style=sasweb;&lt;BR /&gt;
  proc report data=shoes nowd;&lt;BR /&gt;
  column region dispreg product sales inventory;&lt;BR /&gt;
  define region/group noprint;&lt;BR /&gt;
  define dispreg/computed 'Region';&lt;BR /&gt;
  define product / group;&lt;BR /&gt;
  define sales/ sum;&lt;BR /&gt;
  define inventory/ sum;&lt;BR /&gt;
  compute before region;&lt;BR /&gt;
    length holdreg $40;&lt;BR /&gt;
    holdreg = region;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  compute dispreg / character length=40;&lt;BR /&gt;
    dispreg=holdreg;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
                            &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Tue, 09 Dec 2008 16:08:02 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-12-09T16:08:02Z</dc:date>
    <item>
      <title>help required with proc report.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-required-with-proc-report/m-p/65047#M18520</link>
      <description>group   stats drug-a   drug-b&lt;BR /&gt;
                    (n=50)   (n=50)&lt;BR /&gt;
a           min    22         23&lt;BR /&gt;
             avg    12         34&lt;BR /&gt;
group   stats drug-a   drug-b&lt;BR /&gt;
                    (n=50)   (n=50)&lt;BR /&gt;
b           min    82         63&lt;BR /&gt;
             avg    52         74&lt;BR /&gt;
&lt;BR /&gt;
above result(table) in rtf format.&lt;BR /&gt;
&lt;BR /&gt;
i want to repeat column names for each group, by using proc report.&lt;BR /&gt;
how?&lt;BR /&gt;
help me, by providing exact code.</description>
      <pubDate>Tue, 09 Dec 2008 06:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-required-with-proc-report/m-p/65047#M18520</guid>
      <dc:creator>Pavan_SAS</dc:creator>
      <dc:date>2008-12-09T06:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: help required with proc report.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-required-with-proc-report/m-p/65048#M18521</link>
      <description>Hi:&lt;BR /&gt;
  Using a COMPUTED column, you can make a variable that will display on each row of your group. For example, REGION is the GROUP variable in the following report. It will have repetitious values suppressed on every report row for Asia and Canada.&lt;BR /&gt;
     &lt;BR /&gt;
  However, the computed report item, DISPREG is a report column that will hold and display the value for each region. You can still make REGION a group variable, but then use the NOPRINT option so that it is not displayed on the report. But, DISPREG will be displayed on every line of the report, because you assign it the value of a temporary variable HOLDREG, which you grab from REGION on the first row of every group (when REGION has a value).&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sort data=sashelp.shoes out=shoes;&lt;BR /&gt;
  where region in ('Asia', 'Canada');&lt;BR /&gt;
  by region;&lt;BR /&gt;
run;&lt;BR /&gt;
                        &lt;BR /&gt;
ods html file='seegroup.html' style=sasweb;&lt;BR /&gt;
  proc report data=shoes nowd;&lt;BR /&gt;
  column region dispreg product sales inventory;&lt;BR /&gt;
  define region/group noprint;&lt;BR /&gt;
  define dispreg/computed 'Region';&lt;BR /&gt;
  define product / group;&lt;BR /&gt;
  define sales/ sum;&lt;BR /&gt;
  define inventory/ sum;&lt;BR /&gt;
  compute before region;&lt;BR /&gt;
    length holdreg $40;&lt;BR /&gt;
    holdreg = region;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  compute dispreg / character length=40;&lt;BR /&gt;
    dispreg=holdreg;&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
                            &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 09 Dec 2008 16:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-required-with-proc-report/m-p/65048#M18521</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-09T16:08:02Z</dc:date>
    </item>
  </channel>
</rss>

