<?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: ODS RTF coumns jumped to second page while re running proc report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688768#M24522</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183918"&gt;@s_manoj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the prompt replay&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no autoexec and am running code on SAS EG and below is the piece of code that how I am declaring options statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar='^';
ods _all_ close;
ods rtf file = "xxx/xx.rtf" style=styles.rtf headery=0 footery=0 bodytitle_aux;
options orientation=landscape;
options topmargin=1.15in leftmargin=0.8in rightmargin=0.75in bottommargin=1.15in;&lt;BR /&gt;Proc&amp;nbsp;report;&lt;BR /&gt;XXX;&lt;BR /&gt;XXX;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope provided would be useful to solve my problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is a&amp;nbsp; good idea to set system options affecting page layout &lt;STRONG&gt;before&lt;/STRONG&gt; ODS RTF destination statement. The ODS RTF statement in effect looks at the options set at the time the statement executes to start building page definitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is the reason your second run behaves better. Options set with the OPTION statement persist until reset during a session.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Oct 2020 16:00:11 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-10-04T16:00:11Z</dc:date>
    <item>
      <title>ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688754#M24519</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue with RTF output,&amp;nbsp; I have a data with 4 columns and rows that are enough to fit in one page,&lt;/P&gt;&lt;P&gt;in proc report assigned cell width for the column1 as 4.5 in and rest 1 in each and looks good on RTF after executing the program, and the problem starts when I rerun the same program on a fresh session then page margins on rtf were narrowed and the last column is moved to second page, but this issue is getting rectified immediately after re-running the code on the same session, Can someone please explain why this is happening while running the prog for the first time on a new session.&lt;/P&gt;&lt;P&gt;Please note: Page margins were assigned as&lt;/P&gt;&lt;P&gt;options leftmargin = rightmargin= topmargin= bottommargin=&amp;nbsp; , on top of the proc report code&lt;/P&gt;&lt;P&gt;and style that I have selected for reporting is styles.rtf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be very much appreciated and that means a lot to me&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 14:27:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688754#M24519</guid>
      <dc:creator>s_manoj</dc:creator>
      <dc:date>2020-10-04T14:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688756#M24520</link>
      <description>&lt;P&gt;Can you post the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And are Option settings the very first thing in the code?&amp;nbsp; Not just the Proc Report, but the first thing SAS encounters.&amp;nbsp; If they are not at the very beginning, I would make them so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you running the code?&amp;nbsp; Display Manager (PC SAS)?&amp;nbsp; Enterprise Guide?&amp;nbsp; SAS Studio?&amp;nbsp; Depending on how you are running the code, you could put the Options statements in your autoexec or in Enterprise Guide in Tools, Options, there is a section on code where one can specify code to be run before running a program, which is a good place for Options statements.&amp;nbsp; If you're running via batch submission, you can use an -initstmt to set the Options before your code runs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 14:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688756#M24520</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-04T14:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688757#M24521</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the prompt replay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no autoexec and am running code on SAS EG and below is the piece of code that how I am declaring options statement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar='^';
ods _all_ close;
ods rtf file = "xxx/xx.rtf" style=styles.rtf headery=0 footery=0 bodytitle_aux;
options orientation=landscape;
options topmargin=1.15in leftmargin=0.8in rightmargin=0.75in bottommargin=1.15in;&lt;BR /&gt;Proc&amp;nbsp;report;&lt;BR /&gt;XXX;&lt;BR /&gt;XXX;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope provided would be useful to solve my problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 14:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688757#M24521</guid>
      <dc:creator>s_manoj</dc:creator>
      <dc:date>2020-10-04T14:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688768#M24522</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183918"&gt;@s_manoj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the prompt replay&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no autoexec and am running code on SAS EG and below is the piece of code that how I am declaring options statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar='^';
ods _all_ close;
ods rtf file = "xxx/xx.rtf" style=styles.rtf headery=0 footery=0 bodytitle_aux;
options orientation=landscape;
options topmargin=1.15in leftmargin=0.8in rightmargin=0.75in bottommargin=1.15in;&lt;BR /&gt;Proc&amp;nbsp;report;&lt;BR /&gt;XXX;&lt;BR /&gt;XXX;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope provided would be useful to solve my problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is a&amp;nbsp; good idea to set system options affecting page layout &lt;STRONG&gt;before&lt;/STRONG&gt; ODS RTF destination statement. The ODS RTF statement in effect looks at the options set at the time the statement executes to start building page definitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is the reason your second run behaves better. Options set with the OPTION statement persist until reset during a session.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 16:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688768#M24522</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-04T16:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688796#M24523</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183918"&gt;@s_manoj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, move your OPTIONS statements to before your ODS RTF statement.&amp;nbsp; That should take care of your immediate issue.&amp;nbsp; See also what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;is saying in his response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, I bet that you do have an autoexec.sas but that you're just not as aware of it.&amp;nbsp; When you have a moment, run this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC	OPTIONS	OPTION=AUTOEXEC;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You should see something like this in the log:&lt;/P&gt;
&lt;PRE&gt;    SAS (r) Proprietary Software Release 9.4  TS1M6

 AUTOEXEC=E:\Program Files\SASHome\SASFoundation\9.4\autoexec.sas
                   Specifies the location of the SAS AUTOEXEC files.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0:00:00.00
      cpu time            0:00:00.00
      Timestamp           October 04, 2020 15:59:19&lt;/PRE&gt;
&lt;P&gt;My autoexec.sas is&amp;nbsp;E:\Program Files\SASHome\SASFoundation\9.4\autoexec.sas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, in EG, autoexec.sas is typically locked down, and you can't touch it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if you go to Tools, Options, SAS Programs, you should be able to check the check-box for "Submit SAS code when the server is connected."&amp;nbsp; To the right of that is an Edit button which will open a little edit window into which you can enter SAS code that will be run every time EG connects to a Server.&amp;nbsp; This is a good place to put standard OPTIONS code.&amp;nbsp; Keep in mind though that these options will apply to &lt;STRONG&gt;all&lt;/STRONG&gt; EG sessions if you enter them here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2020 21:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688796#M24523</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-04T21:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688851#M24524</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;I have tried switching margins option statement just before rtf destination but still the problem persists&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Manoj</description>
      <pubDate>Mon, 05 Oct 2020 11:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688851#M24524</guid>
      <dc:creator>s_manoj</dc:creator>
      <dc:date>2020-10-05T11:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688852#M24525</link>
      <description>Hi Jim,&lt;BR /&gt;&lt;BR /&gt;Yes, I have autoexec but its not accessible, and tried submitting related code within Tool &amp;gt; options, but I haven't seen any difference&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Manoj S</description>
      <pubDate>Mon, 05 Oct 2020 11:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/688852#M24525</guid>
      <dc:creator>s_manoj</dc:creator>
      <dc:date>2020-10-05T11:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/689080#M24538</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183918"&gt;@s_manoj&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's very odd that the behavior persists even after you've moved your margin statements.&amp;nbsp; Let's check and see if SAS is setting the margin statements the way we think we should.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you insert this code just before your ODS RTF statement?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc	Options	Option=(orientation topmargin leftmargin rightmargin bottommargin);
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The code should look about like this after you insert it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options orientation=landscape;
options topmargin=1.15in leftmargin=0.8in rightmargin=0.75in bottommargin=1.15in;

Proc	Options	Option=(orientation topmargin leftmargin rightmargin bottommargin);
RUN;

ods escapechar='^';
ods _all_ close;
ods rtf file = "xxx/xx.rtf" style=styles.rtf headery=0 footery=0 bodytitle_aux;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;First you want your option statements.&lt;/P&gt;
&lt;P&gt;Second, insert the proc options code I'm suggesting&lt;/P&gt;
&lt;P&gt;Third, should be your ODS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After you've run the Proc Options, I'd like to see the log file.&amp;nbsp; It should look something like this:&lt;/P&gt;
&lt;PRE&gt;    SAS (r) Proprietary Software Release 9.4  TS1M6

 ORIENTATION=LANDSCAPE
                   Specifies the paper orientation to use when printing to a printer.
 TOPMARGIN=1.15 IN Specifies the print margin at the top of the page.
 LEFTMARGIN=0.8 IN Specifies the print margin for the left side of the page.
 RIGHTMARGIN=0.75 IN
                   Specifies the print margin for the right side of the page.
 BOTTOMMARGIN=1.15 IN
                   Specifies the size of the margin at the bottom of a printed page.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0:00:00.00
      cpu time            0:00:00.00
      Timestamp           October 06, 2020 00:02:36&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 05:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/689080#M24538</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-06T05:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF coumns jumped to second page while re running proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/690647#M24565</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thanks for the solution and its really worked&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67441"&gt;@Jim&lt;/a&gt;: Thank you very much for all the information you have provided and the way you have explained is very much clear and appreciated, also to be genuine I am not aware of proc options which heard here, Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sat, 10 Oct 2020 06:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-RTF-coumns-jumped-to-second-page-while-re-running-proc/m-p/690647#M24565</guid>
      <dc:creator>s_manoj</dc:creator>
      <dc:date>2020-10-10T06:46:52Z</dc:date>
    </item>
  </channel>
</rss>

