<?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: pagination footnote causing problem in changing orientation in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859285#M26181</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; What you report I do not observe using 9.4M7. I tweaked your code just a bit. I put the first option before the first ODS PDF invocation in both steps. I also added specific margin options. Then, after every orientation change, I put an ODS PDF: statement. This was recommended to me as a way to get ODS PDF to go out and refresh options. I get the desired results, as shown below:&lt;/P&gt;
&lt;P&gt;File1.PDF:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1676588343775.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80485iCB3AC5413728C34A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1676588343775.png" alt="Cynthia_sas_0-1676588343775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File2.PDF:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1676588483880.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80486iD18D2E7F500FA676/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1676588483880.png" alt="Cynthia_sas_1-1676588483880.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had to meld 2 screen shots together to get all 3 pages in one image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You'll notice I used SASHELP.CLASS, it has 19 rows, there was really no need to make data with an extra step. I also changed the title to use &amp;amp;sysvlong4 instead of &amp;amp;sysver because I wonder whether your issue might be related to a specific maintenance release. I was running on a Windows 10 system. But I would expect the same output to be produced no matter where you were running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;** test 1;
  
footnote 
	justify=left "left text"
	justify=center "center text"
	justify=right "right text"; 

**specify starting options and starting orientation before ODS PDF starts;
options nodate nonumber orientation=portrait topmargin=.5in bottommargin=.5in leftmargin=.5in rightmargin=.5in 
        pageno=1;

ods pdf file="c:\temp\file1.pdf" notoc;      

title "&amp;amp;sysvlong4: Orientation=Portrait";   
 proc print data=sashelp.class;
run; 
      
options orientation=landscape;   
ods pdf; 
      
title "&amp;amp;sysvlong4: Orientation=Landscape";       
proc print data=sashelp.class;
run; 
      
options orientation=portrait;  
ods pdf;
 
title "&amp;amp;sysvlong4: Orientation=Portrait";        
proc print data=sashelp.class;
run; 
      
ods pdf close;   

**test2;

ods escapechar="^";

footnote 
	justify=left "left text"
	justify=center 'Page ^{thispage} of ^{lastpage}'
	justify=right "right text"; 
 
** specify starting options and orientation before ODS PDF starts;
options orientation=portrait topmargin=.5in bottommargin=.5in leftmargin=.5in rightmargin=.5in nodate nonumber pageno=1;   
 
ods pdf file="c:\temp\file2.pdf" notoc; 

title "&amp;amp;sysvlong4: Orientation=Portrait";        
proc print data=sashelp.class;
run; 
      
options orientation=landscape;    
ods pdf; 
      
title "&amp;amp;sysvlong4: Orientation=Landscape";       
proc print data=sashelp.class;
run; 
      
options orientation=portrait;  
ods pdf;
 
title "&amp;amp;sysvlong4: Orientation=Portrait";        
proc print data=sashelp.class;
run; 
      
ods pdf close;    &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; If you are running SAS 9.4 M7 and you run my code and do not get the same results, that that is something that you should report to Tech Support.&amp;nbsp;To open a track with Tech Support, fill out the form at this link: &lt;A href="http://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;http://support.sas.com/ctx/supportform/createForm&lt;/A&gt;&amp;nbsp;and be sure to include your site license number. You can point them to this track so they can get the code out of the track.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 23:04:51 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2023-02-16T23:04:51Z</dc:date>
    <item>
      <title>pagination footnote causing problem in changing orientation</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859261#M26180</link>
      <description>&lt;P&gt;I run the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data one;
	do i=1 to 20;
		rannum=rand('Uniform');
		output;
	end;
run;

/* one */

footnote 
	justify=left "left text"
	justify=center "center text"
	justify=right "right text"; 

options nodate nonumber;

ods pdf file="file1.pdf" notoc;                                                                                                          

options orientation=portrait; 

title "&amp;amp;sysver: Orientation=Portrait";   
 proc print data=one;
run; 
                                                                                                                                        
options orientation=landscape;                                                                                                          
                                                                                                                                        
title "&amp;amp;sysver: Orientation=Landscape";                                                                                                 
proc print data=one;
run; 
                                                                                                                                        
options orientation=portrait;  
 
title "&amp;amp;sysver: Orientation=Portrait";                                                                                                  
proc print data=one;
run; 
                                                                                                                                        
ods pdf close;   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I get something that looks right&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="run1.JPG" style="width: 505px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80479iF8D234FCB6B48404/image-size/large?v=v2&amp;amp;px=999" role="button" title="run1.JPG" alt="run1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I run the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods escapechar="^";

footnote 
	justify=left "left text"
	justify=center 'Page ^{thispage} of ^{lastpage}'
	justify=right "right text"; 
 
ods pdf file="file2.pdf" notoc; 
 
options orientation=portrait;   
 
title "&amp;amp;sysver: Orientation=Portrait";                                                                                                  
proc print data=one;
run; 
                                                                                                                                        
options orientation=landscape;                                                                                                          
                                                                                                                                        
title "&amp;amp;sysver: Orientation=Landscape";                                                                                                 
proc print data=one;
run; 
                                                                                                                                        
options orientation=portrait;  
 
title "&amp;amp;sysver: Orientation=Portrait";                                                                                                  
proc print data=one;
run; 
                                                                                                                                        
ods pdf close;    &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and two things occur.&lt;/P&gt;&lt;P&gt;The pagination is wrong.&amp;nbsp; It is somehow counting 5 pages instead of 3, and the second page appears to be off to the right of the page somewhere as if it is trying to reorient, but just cut off the document.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="run2.JPG" style="width: 721px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80480i9E8A3B6439147401/image-size/large?v=v2&amp;amp;px=999" role="button" title="run2.JPG" alt="run2.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a way to change the orientation and keep the page x of y in place, or do I have to choose one or the other?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 19:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859261#M26180</guid>
      <dc:creator>jtcowder</dc:creator>
      <dc:date>2023-02-16T19:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: pagination footnote causing problem in changing orientation</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859285#M26181</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; What you report I do not observe using 9.4M7. I tweaked your code just a bit. I put the first option before the first ODS PDF invocation in both steps. I also added specific margin options. Then, after every orientation change, I put an ODS PDF: statement. This was recommended to me as a way to get ODS PDF to go out and refresh options. I get the desired results, as shown below:&lt;/P&gt;
&lt;P&gt;File1.PDF:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1676588343775.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80485iCB3AC5413728C34A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1676588343775.png" alt="Cynthia_sas_0-1676588343775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File2.PDF:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1676588483880.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80486iD18D2E7F500FA676/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1676588483880.png" alt="Cynthia_sas_1-1676588483880.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had to meld 2 screen shots together to get all 3 pages in one image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You'll notice I used SASHELP.CLASS, it has 19 rows, there was really no need to make data with an extra step. I also changed the title to use &amp;amp;sysvlong4 instead of &amp;amp;sysver because I wonder whether your issue might be related to a specific maintenance release. I was running on a Windows 10 system. But I would expect the same output to be produced no matter where you were running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;** test 1;
  
footnote 
	justify=left "left text"
	justify=center "center text"
	justify=right "right text"; 

**specify starting options and starting orientation before ODS PDF starts;
options nodate nonumber orientation=portrait topmargin=.5in bottommargin=.5in leftmargin=.5in rightmargin=.5in 
        pageno=1;

ods pdf file="c:\temp\file1.pdf" notoc;      

title "&amp;amp;sysvlong4: Orientation=Portrait";   
 proc print data=sashelp.class;
run; 
      
options orientation=landscape;   
ods pdf; 
      
title "&amp;amp;sysvlong4: Orientation=Landscape";       
proc print data=sashelp.class;
run; 
      
options orientation=portrait;  
ods pdf;
 
title "&amp;amp;sysvlong4: Orientation=Portrait";        
proc print data=sashelp.class;
run; 
      
ods pdf close;   

**test2;

ods escapechar="^";

footnote 
	justify=left "left text"
	justify=center 'Page ^{thispage} of ^{lastpage}'
	justify=right "right text"; 
 
** specify starting options and orientation before ODS PDF starts;
options orientation=portrait topmargin=.5in bottommargin=.5in leftmargin=.5in rightmargin=.5in nodate nonumber pageno=1;   
 
ods pdf file="c:\temp\file2.pdf" notoc; 

title "&amp;amp;sysvlong4: Orientation=Portrait";        
proc print data=sashelp.class;
run; 
      
options orientation=landscape;    
ods pdf; 
      
title "&amp;amp;sysvlong4: Orientation=Landscape";       
proc print data=sashelp.class;
run; 
      
options orientation=portrait;  
ods pdf;
 
title "&amp;amp;sysvlong4: Orientation=Portrait";        
proc print data=sashelp.class;
run; 
      
ods pdf close;    &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; If you are running SAS 9.4 M7 and you run my code and do not get the same results, that that is something that you should report to Tech Support.&amp;nbsp;To open a track with Tech Support, fill out the form at this link: &lt;A href="http://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;http://support.sas.com/ctx/supportform/createForm&lt;/A&gt;&amp;nbsp;and be sure to include your site license number. You can point them to this track so they can get the code out of the track.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 23:04:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859285#M26181</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-02-16T23:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: pagination footnote causing problem in changing orientation</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859391#M26183</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Using your code, I get the same issue I had to begin with.&lt;/P&gt;&lt;P&gt;As you point out, it very well may be related to the maintenance release as I am running&amp;nbsp;&lt;/P&gt;&lt;P&gt;9.04.01M6P11072018.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I included a screen shot of page two, which is displaying wrong.&amp;nbsp; One and Three are as expected.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sasissue02.JPG" style="width: 858px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80514iA6954526E7429641/image-size/large?v=v2&amp;amp;px=999" role="button" title="sasissue02.JPG" alt="sasissue02.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 14:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/pagination-footnote-causing-problem-in-changing-orientation/m-p/859391#M26183</guid>
      <dc:creator>jtcowder</dc:creator>
      <dc:date>2023-02-17T14:23:41Z</dc:date>
    </item>
  </channel>
</rss>

