<?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-One subject data per page in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238513#M43823</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please guide on how to handle only single subject data per page in proc report ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2015 15:17:56 GMT</pubDate>
    <dc:creator>draroda</dc:creator>
    <dc:date>2015-12-09T15:17:56Z</dc:date>
    <item>
      <title>Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238513#M43823</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please guide on how to handle only single subject data per page in proc report ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 15:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238513#M43823</guid>
      <dc:creator>draroda</dc:creator>
      <dc:date>2015-12-09T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238515#M43824</link>
      <description>&lt;P&gt;Use the PAGE option on a &lt;A href="http://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#p16uti3vzgml7gn1nt3ov7cqxf9i.htm" target="_self"&gt;BREAK AFTER statement&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 15:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238515#M43824</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2015-12-09T15:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238519#M43825</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used that option and i am looking for alternate also where i can use some macro variables and populate the subject id in the header part/title of page.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 15:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238519#M43825</guid>
      <dc:creator>draroda</dc:creator>
      <dc:date>2015-12-09T15:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238557#M43835</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used below but not &amp;nbsp;working as per my requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;input x $ score ;&lt;BR /&gt;datalines;&lt;BR /&gt;a 1&lt;BR /&gt;a 2&lt;BR /&gt;a .&lt;BR /&gt;a 3&lt;BR /&gt;a 4&lt;BR /&gt;b .&lt;BR /&gt;b 4&lt;BR /&gt;b 4&lt;BR /&gt;b 6&lt;BR /&gt;b .&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table aa as select distinct x from a;&lt;BR /&gt;select distinct x into :n_1-:n_&amp;amp;sqlobs from a;&lt;BR /&gt;quit;&lt;BR /&gt;%let N = &amp;amp;sqlobs;&lt;BR /&gt;%macro headache;&lt;BR /&gt;%do i=1 %to &amp;amp;N;&lt;BR /&gt;%put &amp;amp;&amp;amp;n_&amp;amp;i;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table report as select score from a where x="&amp;amp;&amp;amp;n_&amp;amp;i";&lt;BR /&gt;quit;&lt;BR /&gt;data re;&lt;BR /&gt;set report;&lt;BR /&gt;sn+1;&lt;BR /&gt;run;&lt;BR /&gt;title "report for &amp;amp;&amp;amp;n_&amp;amp;i";&lt;BR /&gt;ODS PDF FILE="D:\Practice\test.pdf";&lt;BR /&gt;proc report data=re nowd;&lt;BR /&gt;column sn score;&lt;BR /&gt;define sn /order ;&lt;BR /&gt;define score/style(column)={just=left};&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%headache;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So ideally this should print two pages in output but it print only single page and that is for last subject only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have observed that macro is overwriting the observations.Please guide.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 18:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238557#M43835</guid>
      <dc:creator>draroda</dc:creator>
      <dc:date>2015-12-09T18:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238559#M43836</link>
      <description>&lt;P&gt;You may want to look at BY processing with the #BYLINE and #BYVAL to modify the title.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 18:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238559#M43836</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-12-09T18:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238716#M43866</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please guide and tweak the attached code for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this, Proc report is overwriting previous subject observation and poduce only one page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need two page in that report&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 15:58:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238716#M43866</guid>
      <dc:creator>draroda</dc:creator>
      <dc:date>2015-12-10T15:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238722#M43868</link>
      <description>&lt;P&gt;In your macro, the statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS PDF FILE="D:\Practice\test.pdf"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;recreates test.pdf every time the macro is called. That means each time you call the macro the macro overwrites the previous version of the file. Remove this statement from your macro and put it just before you run the macro.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 16:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238722#M43868</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2015-12-10T16:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report-One subject data per page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238729#M43871</link>
      <description>Thanks Tom,&lt;BR /&gt;&lt;BR /&gt;I have placed the same outside macro but now it write only first observation .&lt;BR /&gt;&lt;BR /&gt;I also tried to place it inside macro but before do loop and it writes last observatioon .</description>
      <pubDate>Thu, 10 Dec 2015 16:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-One-subject-data-per-page/m-p/238729#M43871</guid>
      <dc:creator>draroda</dc:creator>
      <dc:date>2015-12-10T16:50:08Z</dc:date>
    </item>
  </channel>
</rss>

