<?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: Page reset in a single file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Page-reset-in-a-single-file/m-p/210547#M39029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; The issue that you are going to run into is that you want the first report to have page 1 of 10, page 2 of 10; and then you want to start over at page 1 of 10, page 2 of 10. You can reset the beginning page number. But by default, what you will get is page 1 of 20, page 2 of 20 and then after page 10 of 20, numbering would start over with page 1 of 20, page 2 of 20 again. You can see how it works for yourself with this example (only 4 pages total):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods escapechar='^';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;options pageno=1 nonumber nodate;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf file='c:\temp\testpgno.pdf';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.shoes(obs=40);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title1 j=r 'Page ^{thispage} of ^{lastpage}';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title2 'SASHELP.SHOES';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;options pageno=1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.prdsale(obs=40);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title1 j=r 'Page ^{thispage} of ^{lastpage}';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title2 'SASHELP.PRDSALE';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, note that one way to reset page numbers is to do it between procedure steps. The PROC REPORT statement allows you to use the BYPAGENO= option, when you have a BY statement, but again, that would give you 1 of 20, 2 of 20, etc for the first group and then 1 of 20, 2 of 20, etc for the second group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your only way to work it is to probably do it as 2 separate documents that you put together using an Adobe product or some 3rd party software to combine PDF files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jun 2015 00:42:09 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-06-20T00:42:09Z</dc:date>
    <item>
      <title>Page reset in a single file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Page-reset-in-a-single-file/m-p/210546#M39028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I received this request from FDA , to generate a site level listing.&lt;/P&gt;&lt;P&gt;For example, if its an&amp;nbsp; Adverse event listing, so they want all AEs to subjects from that site first and then page break by nest site and so on, whih is okay. &lt;/P&gt;&lt;P&gt;I can use page break option by site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the catch is, they want to reset the page no as well for the next site. I don't know how to do that. For example, they want page 1 of page 10 for next site in the same file.&lt;/P&gt;&lt;P&gt;Is there a way we could do that?&lt;/P&gt;&lt;P&gt;Also, is their any option which can create a table of content for all those sites in pdf, so that i can click on the link in TOC, and go to that site?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using proc report to generate the listings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your inputs are really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Megha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 23:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Page-reset-in-a-single-file/m-p/210546#M39028</guid>
      <dc:creator>maggi2410</dc:creator>
      <dc:date>2015-06-19T23:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Page reset in a single file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Page-reset-in-a-single-file/m-p/210547#M39029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; The issue that you are going to run into is that you want the first report to have page 1 of 10, page 2 of 10; and then you want to start over at page 1 of 10, page 2 of 10. You can reset the beginning page number. But by default, what you will get is page 1 of 20, page 2 of 20 and then after page 10 of 20, numbering would start over with page 1 of 20, page 2 of 20 again. You can see how it works for yourself with this example (only 4 pages total):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods escapechar='^';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;options pageno=1 nonumber nodate;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf file='c:\temp\testpgno.pdf';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.shoes(obs=40);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title1 j=r 'Page ^{thispage} of ^{lastpage}';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title2 'SASHELP.SHOES';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;options pageno=1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.prdsale(obs=40);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title1 j=r 'Page ^{thispage} of ^{lastpage}';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title2 'SASHELP.PRDSALE';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods pdf close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, note that one way to reset page numbers is to do it between procedure steps. The PROC REPORT statement allows you to use the BYPAGENO= option, when you have a BY statement, but again, that would give you 1 of 20, 2 of 20, etc for the first group and then 1 of 20, 2 of 20, etc for the second group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your only way to work it is to probably do it as 2 separate documents that you put together using an Adobe product or some 3rd party software to combine PDF files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 00:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Page-reset-in-a-single-file/m-p/210547#M39029</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-06-20T00:42:09Z</dc:date>
    </item>
  </channel>
</rss>

