<?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 Determining number of lines in proc report output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246107#M268588</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I would appreciate help regarding the following. I am using proc report with ods pdf output in SAS 9.3. As part of the output, I would like to include a table with a variable number of rows. I am having difficulty getting the page breaks to occur at the correct locations with the correct formatting. For example, sometimes the last row is missing the bottom border.&lt;/P&gt;
&lt;P&gt;Also, I am getting the following error: "Continuing contents of page NN, which would not fit on a single physical page."&lt;/P&gt;
&lt;P&gt;I have spent a lot of time researching this error and have not been able to find a solution that applies to my situation. Therefore, I would like to see if there is a way to compute the number of lines in a table and then create page breaks after a certain number of lines. For example, below the number of lines is 9. Is there a way to compute this number?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Column 1 &amp;nbsp;Column 2 &amp;nbsp; &amp;nbsp;Column 3&lt;BR /&gt;ABC &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah test &lt;BR /&gt;DEF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;GHI &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;KelseyB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jan 2016 15:54:02 GMT</pubDate>
    <dc:creator>KelseyB</dc:creator>
    <dc:date>2016-01-26T15:54:02Z</dc:date>
    <item>
      <title>Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246107#M268588</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I would appreciate help regarding the following. I am using proc report with ods pdf output in SAS 9.3. As part of the output, I would like to include a table with a variable number of rows. I am having difficulty getting the page breaks to occur at the correct locations with the correct formatting. For example, sometimes the last row is missing the bottom border.&lt;/P&gt;
&lt;P&gt;Also, I am getting the following error: "Continuing contents of page NN, which would not fit on a single physical page."&lt;/P&gt;
&lt;P&gt;I have spent a lot of time researching this error and have not been able to find a solution that applies to my situation. Therefore, I would like to see if there is a way to compute the number of lines in a table and then create page breaks after a certain number of lines. For example, below the number of lines is 9. Is there a way to compute this number?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Column 1 &amp;nbsp;Column 2 &amp;nbsp; &amp;nbsp;Column 3&lt;BR /&gt;ABC &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah test &lt;BR /&gt;DEF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;GHI &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah blah &amp;nbsp; &amp;nbsp; &amp;nbsp;test test &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;blah &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;KelseyB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246107#M268588</guid>
      <dc:creator>KelseyB</dc:creator>
      <dc:date>2016-01-26T15:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246115#M268589</link>
      <description>&lt;P&gt;You might want to investigate adding a variable to your data that is used to create a page break either in a BY statement or .&lt;/P&gt;
&lt;P&gt;Since the number of lines displayed per page&amp;nbsp;is going to be influenced by title, footnote, fontsizes and paper or logical page size, numbers of summaries and such&amp;nbsp;there really isn't a generic solution to "number of lines" per page issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have had the luxury with some of my projects of allways knowing the numbers of subgroups and sub-subgroups and so could relatively easily add a page variable in a data step such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data addpage;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set data;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if column1 in ('ABC' 'DEF') then PageVar=1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; else if column1 in ('GHI') then PageVar=2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming the generation of the report doesn't take too long then look at your result and add variable as makes sense.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 16:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246115#M268589</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-26T16:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246116#M268590</link>
      <description>&lt;P&gt;So what do you want on each page. &amp;nbsp;Is it 20 observations, then:&lt;/P&gt;
&lt;PRE&gt;data report_data;
  set report_data;
  pge=floor(_n_/20);
run;

proc report ...;
  ...
  
  break on pge / page;
...
&lt;/PRE&gt;
&lt;P&gt;If its on a group then break on group. &amp;nbsp;If its something else, please specify. &amp;nbsp;Also note, you can export the data from proc report with an out=, which will have the data as in the report, you could use that, but the question is why, just fix the breaking yourself in a datastep.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 16:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246116#M268590</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-26T16:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246120#M268591</link>
      <description>&lt;P&gt;RW9,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback. &amp;nbsp;I need to break on the number of lines, not rows, in my dataset. &amp;nbsp;Otherwise, I would use your logic. &amp;nbsp;I think I will just count the number of characters and see if I can figure something out from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you though.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 16:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246120#M268591</guid>
      <dc:creator>KelseyB</dc:creator>
      <dc:date>2016-01-26T16:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246122#M268592</link>
      <description>&lt;P&gt;Thanks ballardw. &amp;nbsp;I will try this suggestion!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 16:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246122#M268592</guid>
      <dc:creator>KelseyB</dc:creator>
      <dc:date>2016-01-26T16:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246125#M268593</link>
      <description>&lt;P&gt;What I have seen before, and done myself also, is to have a split variable macro, this takes a string and splits into known fixed widths, sometimes with indentations:&lt;/P&gt;
&lt;P&gt;VAR1&lt;/P&gt;
&lt;P&gt;abcdefghijklm...aabb...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;becomes&lt;/P&gt;
&lt;P&gt;VAR1&lt;/P&gt;
&lt;P&gt;abcd...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; aabb...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then following on from that, you can use the _n_/number per page. &amp;nbsp;Basically do the calculation in pre-datastep then report.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 16:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246125#M268593</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-26T16:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246127#M268594</link>
      <description>&lt;P&gt;Great! &amp;nbsp;I will try this out. &amp;nbsp;Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2016 16:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246127#M268594</guid>
      <dc:creator>KelseyB</dc:creator>
      <dc:date>2016-01-26T16:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246269#M268595</link>
      <description>&lt;P&gt;Maybe you could take a look this paper I wrote before.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings12/389-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/389-2012.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 02:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246269#M268595</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-01-27T02:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246298#M268596</link>
      <description>&lt;P&gt;Coild you please tell me what is 'page' in following line?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report ...;
  ...
  
  break on pge / page;
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jan 2016 08:52:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246298#M268596</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2016-01-27T08:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Determining number of lines in proc report output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246300#M268597</link>
      <description>&lt;P&gt;PGE is a variable created in the datastep before to indicate where a page break should go. &amp;nbsp;The syntax is:&lt;/P&gt;
&lt;P&gt;break on &amp;lt;variable&amp;gt; / &amp;lt;options&amp;gt;;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 09:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Determining-number-of-lines-in-proc-report-output/m-p/246300#M268597</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-01-27T09:01:02Z</dc:date>
    </item>
  </channel>
</rss>

