<?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 page break in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-page-break/m-p/559487#M10340</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16600"&gt;@SASPhile&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I take it that you derive your current dataset (let's call it HAVE) from another dataset (HAVE0) and compute the page number as shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have0(drop=i);
do treatment='Z', 'L';
  do i=1 to 10;
    output;
  end;
end;
run;

data have;
set have0;
pg=ceil(_n_/8);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To obtain the improved page numbers you could start with HAVE0 and derive variable PG as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=_ctr);
set have0;
by treatment notsorted;
if first.treatment then _ctr=1;
else _ctr+1;
if mod(_ctr,8)=1 then pg+1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 May 2019 20:44:54 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-05-16T20:44:54Z</dc:date>
    <item>
      <title>Proc report page break</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-page-break/m-p/559470#M10330</link>
      <description>&lt;P&gt;&lt;BR /&gt;I'm preparing datastep to create proc report. So in datastep I have the variables treament and pg. I want to&lt;BR /&gt;display data per treatment group in separate pages. But while creating pg, same value is present for both treatments.&lt;BR /&gt;So in proc report a page name is repeated two times. I want to increment pg of treatment b,when a and b have same pg.&lt;BR /&gt;from below:&lt;/P&gt;&lt;P&gt;pg is derived as&lt;BR /&gt;pg=ceil(_n_/8); /**here I'm opting 8, it can change to any value**/&lt;/P&gt;&lt;P&gt;treatment&amp;nbsp; &amp;nbsp;pg&lt;BR /&gt;Z&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;BR /&gt;Z&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;L&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;L&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;treatment pg&lt;BR /&gt;Z&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;Z&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;L&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;BR /&gt;L&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 19:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-report-page-break/m-p/559470#M10330</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2019-05-16T19:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report page break</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-report-page-break/m-p/559487#M10340</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16600"&gt;@SASPhile&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I take it that you derive your current dataset (let's call it HAVE) from another dataset (HAVE0) and compute the page number as shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have0(drop=i);
do treatment='Z', 'L';
  do i=1 to 10;
    output;
  end;
end;
run;

data have;
set have0;
pg=ceil(_n_/8);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To obtain the improved page numbers you could start with HAVE0 and derive variable PG as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=_ctr);
set have0;
by treatment notsorted;
if first.treatment then _ctr=1;
else _ctr+1;
if mod(_ctr,8)=1 then pg+1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 May 2019 20:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-report-page-break/m-p/559487#M10340</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-05-16T20:44:54Z</dc:date>
    </item>
  </channel>
</rss>

