<?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: need report for 40 variables and 20 observations in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46302#M6055</link>
    <description>Hi:&lt;BR /&gt;
  Aside from other issues, SAS would want every "page" to contain all the same observations. So if you look at the output from this program, you will see that there is a column for HEIGHT and WEIGHT for every observation (there are only 3 observations) -- for the observation for Barbara, the values for HEIGHT and WEIGHT are shown as missing.&lt;BR /&gt;
 &lt;BR /&gt;
  Unless you did a LOT more processing, this is the way that most SAS procedures will behave by default. BTW, you can see that in the code below, I do NOT need to list all the variable names in the COLUMN statement (the only reason to list the variables in the COLUMN statement is if you need for the variables to be in a particular order from left to right on the report row).&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data makedata;&lt;BR /&gt;
  set sashelp.class(obs=3);&lt;BR /&gt;
  if _n_ = 3 then do;&lt;BR /&gt;
     height=.;&lt;BR /&gt;
     weight=.;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                             &lt;BR /&gt;
ods html file='c:\temp\showdata.html' style=sasweb;&lt;BR /&gt;
proc report data=makedata nowd;&lt;BR /&gt;
  title 'Cannot "remove" variables for height and weight for Barbara obs';&lt;BR /&gt;
  column _character_ _numeric_;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  break after name / page;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Tue, 07 Dec 2010 19:38:04 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-12-07T19:38:04Z</dc:date>
    <item>
      <title>need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46301#M6054</link>
      <description>Hello if anyone know the solution please reply me&lt;BR /&gt;
&lt;BR /&gt;
i have a data set with around 40 variables and 20 observarions&lt;BR /&gt;
i need to produce a report for that in the below mentioned way&lt;BR /&gt;
&lt;BR /&gt;
1.each observation in a page i.e 20 observations in 20 pages&lt;BR /&gt;
&lt;BR /&gt;
2.one obervation has only 18 variables and the data and in the remaining 2 variables s missing.&lt;BR /&gt;
&lt;BR /&gt;
report for this observation should have only 18 variables and the variables with missing data must be removed.&lt;BR /&gt;
&lt;BR /&gt;
for this program with proc report i need to give all the 40 variable names in the column statement.&lt;BR /&gt;
&lt;BR /&gt;
is there any other way to solve this without giving the 40 variable names&lt;BR /&gt;
since i have many data sets with different variable names&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Sid</description>
      <pubDate>Tue, 07 Dec 2010 18:59:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46301#M6054</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-07T18:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46302#M6055</link>
      <description>Hi:&lt;BR /&gt;
  Aside from other issues, SAS would want every "page" to contain all the same observations. So if you look at the output from this program, you will see that there is a column for HEIGHT and WEIGHT for every observation (there are only 3 observations) -- for the observation for Barbara, the values for HEIGHT and WEIGHT are shown as missing.&lt;BR /&gt;
 &lt;BR /&gt;
  Unless you did a LOT more processing, this is the way that most SAS procedures will behave by default. BTW, you can see that in the code below, I do NOT need to list all the variable names in the COLUMN statement (the only reason to list the variables in the COLUMN statement is if you need for the variables to be in a particular order from left to right on the report row).&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data makedata;&lt;BR /&gt;
  set sashelp.class(obs=3);&lt;BR /&gt;
  if _n_ = 3 then do;&lt;BR /&gt;
     height=.;&lt;BR /&gt;
     weight=.;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                             &lt;BR /&gt;
ods html file='c:\temp\showdata.html' style=sasweb;&lt;BR /&gt;
proc report data=makedata nowd;&lt;BR /&gt;
  title 'Cannot "remove" variables for height and weight for Barbara obs';&lt;BR /&gt;
  column _character_ _numeric_;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  break after name / page;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 07 Dec 2010 19:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46302#M6055</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-12-07T19:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46303#M6056</link>
      <description>I'm not sure it this will completely suit your purpose but here is one approach.&lt;BR /&gt;
&lt;BR /&gt;
A small example data set.&lt;BR /&gt;
data junk;&lt;BR /&gt;
   infile datalines truncover;&lt;BR /&gt;
   input v1-v5 ;&lt;BR /&gt;
   label &lt;BR /&gt;
      v1 = 'Label 1'&lt;BR /&gt;
      v2 = 'Label 2'&lt;BR /&gt;
      v3 = 'Label 3'&lt;BR /&gt;
      v4 = 'Label 4'&lt;BR /&gt;
      v5 = 'Label 5'&lt;BR /&gt;
   ;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 2 3 4 5&lt;BR /&gt;
6 7 8 9 10&lt;BR /&gt;
11 12 13    &lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Manually transpose the data creating a page variable and using the labels of the individual variables to conditionally create a categorical variable for non-missing values.&lt;BR /&gt;
&lt;BR /&gt;
data junk2 (keep=page label value);&lt;BR /&gt;
    set junk;&lt;BR /&gt;
    array v v1-v5;&lt;BR /&gt;
    do i= 1 to dim (v);&lt;BR /&gt;
      page= _n_;&lt;BR /&gt;
      if v&lt;I&gt; ne . then do;&lt;BR /&gt;
         label= vlabel(v&lt;I&gt;);&lt;BR /&gt;
         value= v&lt;I&gt;;&lt;BR /&gt;
         output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
This will provide a single class or group variable, LABEL in this case with the values in an analysis varible and PAGE something to provide a break on changing values.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Tue, 07 Dec 2010 21:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46303#M6056</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2010-12-07T21:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46304#M6057</link>
      <description>Hi. There is an option in proc report 'nozero' can do it.&lt;BR /&gt;
But it only work for listing destination.&lt;BR /&gt;
Maybe you can save the output of listing destination to txt file or something else.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data makedata;&lt;BR /&gt;
  set sashelp.class(obs=3);&lt;BR /&gt;
  if _n_ = 3 then do;&lt;BR /&gt;
     height=.;&lt;BR /&gt;
     weight=.;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                             &lt;BR /&gt;
&lt;BR /&gt;
proc report data=makedata nowd;&lt;BR /&gt;
  title 'Cannot "remove" variables for height and weight for Barbara obs';&lt;BR /&gt;
  column _character_ _numeric_;&lt;BR /&gt;
  define name / group;&lt;BR /&gt;
  define height/ display nozero;&lt;BR /&gt;
  define weight/display nozero;&lt;BR /&gt;
  break after name / page;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 08 Dec 2010 05:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46304#M6057</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-12-08T05:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46305#M6058</link>
      <description>The NOZERO is a good possibility Ksharp. Further testing should show that the NOZERO option will work for the PDF, RTF, and HTML destinations as well.  The option is used on the DEFINE statement and will remove a column if all values in the table are missing or 0 (zero).  In this case with the PAGE option on the BREAK AFTER statement the table is the page.</description>
      <pubDate>Wed, 08 Dec 2010 06:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46305#M6058</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-12-08T06:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46306#M6059</link>
      <description>Hi.ArtC&lt;BR /&gt;
I guess your sas version is before 9.2.So 'nozero' is worked for PDF RTF.....&lt;BR /&gt;
Unfortunately, After SAS9.2 'nozero' is only supported for listing destination.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 09 Dec 2010 08:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46306#M6059</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-12-09T08:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46307#M6060</link>
      <description>Well I know that is what the documentation says, and I cannot speak for other SAS installations, but at least NOZERO works for my version of SAS9.2 under windows xp for HTML, PDF, and RTF.  Of course that too may get fixed in the future, but for now.....</description>
      <pubDate>Thu, 09 Dec 2010 19:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46307#M6060</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-12-09T19:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46308#M6061</link>
      <description>The NOZERO option was broken for a short period early in 9.2. However it is present and working for all ODS destinations in the current release.</description>
      <pubDate>Thu, 09 Dec 2010 20:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46308#M6061</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2010-12-09T20:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: need report for 40 variables and 20 observations</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46309#M6062</link>
      <description>Hi.&lt;BR /&gt;
Unfortunately My SAS 9.2 can not work.&lt;BR /&gt;
It looks like I need the current version of SAS.</description>
      <pubDate>Fri, 10 Dec 2010 03:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/need-report-for-40-variables-and-20-observations/m-p/46309#M6062</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-12-10T03:07:44Z</dc:date>
    </item>
  </channel>
</rss>

