<?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 issue in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334867#M17998</link>
    <description>&lt;P&gt;How to provide test/example data in a data step:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 10:04:58 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-02-22T10:04:58Z</dc:date>
    <item>
      <title>proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334841#M17996</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I prepare the below table with Proc report:&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7390i50FCE0EB873CCCE6/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="proc report" title="proc report" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 03:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334841#M17996</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2017-02-22T03:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334863#M17997</link>
      <description>&lt;P&gt;By writing SAS code yourself, or hiring a contractor to do the work for you. &amp;nbsp;You have not provided any test data (in the form of a datastep) nor have you shown anything you have tried so there is no "question" here to answer. &amp;nbsp;I don't see anything particularly complicated in what you have shown.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 09:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334863#M17997</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-22T09:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334867#M17998</link>
      <description>&lt;P&gt;How to provide test/example data in a data step:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 10:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334867#M17998</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-22T10:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334909#M17999</link>
      <description>&lt;P&gt;Proc report is based on column to prepare report. However, in my table some rows have two columns and some have foure columns. What 's why I am not sure how to prepare data.&lt;/P&gt;&lt;P&gt;I can use compute block to prepare the first row like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute before;&lt;/P&gt;&lt;P&gt;line&amp;nbsp;@1 'aaaaaaaaaaaaaa';&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this is only one column, not like the first row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition how to prepare row 4, 7, and 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute after a=1; (here a=1 does not work)&lt;/P&gt;&lt;P&gt;line&amp;nbsp;@1 'bbbbbbbbbbbbbb';&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute after a;&lt;/P&gt;&lt;P&gt;if a=1 then line&lt;SPAN&gt;&amp;nbsp;@1 'bbbbbbbbbbbbbb'; &amp;nbsp; (If a=1 does not work)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;endcomp.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 12:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334909#M17999</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2017-02-22T12:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334915#M18000</link>
      <description>&lt;P&gt;I still can't see any example date here. Programs without data are useless. See my previous post how to post the example data.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 12:20:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/334915#M18000</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-22T12:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335125#M18004</link>
      <description>Also, when you post data, you also need to post ALL your code, including your ODS statements, not just a code snippet.&lt;BR /&gt;cynthia</description>
      <pubDate>Wed, 22 Feb 2017 21:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335125#M18004</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-02-22T21:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335176#M18006</link>
      <description>&lt;P&gt;Please find the code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data x;&lt;BR /&gt;format B $50. C D $10.;&lt;BR /&gt;A=1; B='aaaaaaaaaaa'; output;&lt;BR /&gt;A=1; B='aa'; C='aa';D='aa'; output;&lt;BR /&gt;A=1; B=' '; C=' ';D=' '; output;&lt;BR /&gt;A=2; B='bbbbbbbbbbbbbbbbbbb'; C=''; D=''; output;&lt;BR /&gt;A=2; B='bb'; C='bb';D='bb'; output;&lt;BR /&gt;A=2; B='bb'; C='bb';D='bb'; output;&lt;BR /&gt;A=3; B='cccccccccccccccccccc';C=''; D=''; output;&lt;BR /&gt;A=3; B='cc'; C='cc';D='cc'; output;&lt;BR /&gt;A=3; B='cc'; C='cc';D='cc'; output;&lt;BR /&gt;A=4; B='ddddddddddd'; C=''; D='';output;&lt;BR /&gt;A=4; B='dd'; C='dd';D='dd'; output;&lt;BR /&gt;A=4; B='dd'; C='dd';D='dd'; output;&lt;BR /&gt;run;&lt;BR /&gt;ods rtf file='C:\XXXX\Desktop\11111.rtf';&lt;BR /&gt;proc report data=x;&lt;BR /&gt;column A B C D;&lt;BR /&gt;define a /group;&lt;BR /&gt;run;&lt;BR /&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is output. Actually, I want rows of 1,4,7,10 across column B C D, not only in Column B.&lt;/P&gt;&lt;P&gt;Hopefully someone can help me out. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7406i91FFD3F2CDF3C70C/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="1.jpg" title="1.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 02:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335176#M18006</guid>
      <dc:creator>Niugg2010</dc:creator>
      <dc:date>2017-02-23T02:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335192#M18007</link>
      <description>&lt;P&gt;The way your data are currently structured makes it virtually impossible to have what you want -- you can't make the value you show (aaaaaaaaaa, bbbbbbbbb, etc) span columns B, C and D using PROC REPORT. However, you can have a LINE statement that spans ALL of the 4 columns. However, if your data were structured differently if might work. It would not look exactly as you want, but it would be closer than what you have now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7408i03FC9B011D6C5914/image-size/original?v=1.0&amp;amp;px=-1" alt="line_before.png" title="line_before.png" border="0" /&gt;&lt;BR /&gt; cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the alternate structure of the data, and a PROC FORMAT for the 4 main headers you want (I just numbered B, C and D so that I could be sure the rows were in the correct order and the data was read correctly:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length b c d $10;
  infile datalines dlm=',';
  input a b $ c $ d $;
return;
datalines;
1,aa1,aa2,aa3
2,bb1,bb2,bb3
2,bb4,bb5,bb6
3,cc1,cc2,cc3
3,cc4,cc5,cc6
4,dd1,dd2,dd3
4,dd4,dd5,dd6
;
run;
 
proc format;
  value grpfmt 1 = 'aaaaaaaaaa'
               2 = 'bbbbbbbbbb'
	       3 = 'cccccccccc'
	       4 = 'dddddddddd';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2017 03:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335192#M18007</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-02-23T03:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc report issue</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335283#M18014</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Another way that you can do it (using the slightly different data that I posted) is to use the Report Writing Interface. It does the type of column-spanning you want. However, the RWI is not supported for RTF, but is supported for PDF. See below:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7412i06616EC450A4668F/image-size/original?v=1.0&amp;amp;px=-1" alt="use_rwi_with_pdf.png" title="use_rwi_with_pdf.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, it is possible to get what you want using the RWI, with a DATA step, not PROC REPORT. There will be a WARNING in the log if you use the code with RTF. Just remember that if you cannot use PDF for this, then your choice is to use PROC REPORT to get RTF and the first example I posted. Or to switch to PDF and get the above example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-issue/m-p/335283#M18014</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-02-23T14:29:10Z</dc:date>
    </item>
  </channel>
</rss>

