<?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 Group Variable is splitting into Two pages in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192321#M48296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issues, where group variable is splitting into two pages when I use proc report (ods RTF).&amp;nbsp;&amp;nbsp; I was wondering is there way to keep group variable in the same page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Apr 2014 15:39:37 GMT</pubDate>
    <dc:creator>Almighty</dc:creator>
    <dc:date>2014-04-25T15:39:37Z</dc:date>
    <item>
      <title>Proc Report Group Variable is splitting into Two pages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192321#M48296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issues, where group variable is splitting into two pages when I use proc report (ods RTF).&amp;nbsp;&amp;nbsp; I was wondering is there way to keep group variable in the same page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 15:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192321#M48296</guid>
      <dc:creator>Almighty</dc:creator>
      <dc:date>2014-04-25T15:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Group Variable is splitting into Two pages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192322#M48297</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; It is hard to visualize what you mean when you say that your "group variable is splitting into two pages" -- do you mean your group is too long (and has too many observations to fit on one page such as with the example #1 below) or that your group is too wide (and has too many variables to fit on one page, such as with example #2 below). Can you post the PROC REPORT code you're using and some of the data or post a screen shot of what you mean?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Remember that with RTF output, the boundaries of the physical page will impact the output, as well as the font size and other presentation elements of your report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\too_long.rtf';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** Sedan is too "long" to fit on one page;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** but Hybrid will fit on one page;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.cars nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title 'Example 1: Too Long';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title2 'Hybrid will "fit" but Sedan will not "fit" on 1 page';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where type = 'Sedan' or type='Hybrid';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column type make model msrp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define type / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define make / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define model / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; break after type / page;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\too_wide.rtf';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** only need one type for a too wide report;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.cars nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title 'Example 2: Too Wide';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; column type make model origin drivetrain msrp invoice enginesize&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cylinders horsepower mpg_city mpg_highway&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weight wheelbase length;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where type='Wagon';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define type / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; break after type / page;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 16:23:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192322#M48297</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-04-25T16:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Group Variable is splitting into Two pages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192323#M48298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the your example 1 code with minor modification.&amp;nbsp; Please see below image, where 'Chrysler' is splitted into two pages.&amp;nbsp; I wanted to print entire 'Chrysler' should be in page 1 or page 2.&amp;nbsp; Page 2 is more appropriate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods rtf file='C:\Users\sk279\Desktop\test\too_long.rtf';&lt;/P&gt;&lt;P&gt;** Sedan is too "long" to fit on one page;&lt;/P&gt;&lt;P&gt;** but Hybrid will fit on one page;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.cars nowd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; title 'Example 1: Too Long';&lt;/P&gt;&lt;P&gt;&amp;nbsp; title2 'Hybrid will "fit" but Sedan will not "fit" on 1 page';&lt;/P&gt;&lt;P&gt;&amp;nbsp; where type = 'Sedan' or type='Hybrid';&lt;/P&gt;&lt;P&gt;&amp;nbsp; column type make model msrp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define type / order noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define make / order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define model / order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; break after type / skip;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute after type ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; line '';&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; compute after make ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; line '';&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/6156_Capture.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 16:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192323#M48298</guid>
      <dc:creator>Almighty</dc:creator>
      <dc:date>2014-04-25T16:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report Group Variable is splitting into Two pages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192324#M48299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I see a few issues with your version of the code. First, SKIP is not appropriate for RTF -- it will be ignored. Next, even though you have MAKE as an ORDER item, you have TYPE as the PRIMARY order item. So even with TYPE as NOPRINT, you have not told PROC REPORT that you even want MAKE to be kept together. Have you investigated using the PAGE option, as I showed in my original code, which in my example, forces each TYPE to start on a separate page? You might instead use &lt;STRONG style="font-family: courier new,courier;"&gt;BREAK AFTER MAKE/PAGE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Frequently, for issues like this, if you add the SPANROWS option to your PROC REPORT statement, spanning the rows, sometimes causes breaking to happen the way you want. For example, when I use SPANROWS on your example code,&amp;nbsp; people create their own "fake" page breaking variable and do page breaking on the "fake" variable. There have been many postings about this. Or, you may want to investigate TAGSETS.RTF, which has different page breaking algorithms that it uses (and automatically puts the word "Continued" when a table breaks across pages).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; However, in SAS 9.4, when I just modify your code to use SPANROWS, I get the output shown in the attached screen shot.&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='C:\temp\sk279_too_long_spanrows.rtf';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** Sedan is too "long" to fit on one page;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** but Hybrid will fit on one page;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.cars nowd &lt;SPAN style="color: #ff00ff;"&gt;spanrows&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title 'Example 1: Too Long';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title2 'Hybrid will "fit" but Sedan will not "fit" on 1 page';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where type = 'Sedan' ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column type make model msrp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define type / order noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define make / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define model / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; break after type / skip;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute after type ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; line '';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; compute after make ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; line '';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11100iD4841F0E32952997/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="adding_spanrows_94.png" title="adding_spanrows_94.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 18:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Report-Group-Variable-is-splitting-into-Two-pages/m-p/192324#M48299</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-04-25T18:17:44Z</dc:date>
    </item>
  </channel>
</rss>

