<?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: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669199#M24268</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298115"&gt;@blueskyxyz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 986px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47133iCE78F4FDC5DE6E9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;Sorry, I try to expalin&amp;nbsp; in a simple way:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According the dataset you have,&amp;nbsp; how to get the number of&amp;nbsp; lines in&amp;nbsp; one rtf listing page?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You DON'T.&amp;nbsp; &amp;nbsp;It there is too much information to fit on one page the word processor that is reading the RTF file will figure that out and start a new page for you.&lt;/P&gt;
&lt;P&gt;Please explain why it matters? If you want each value of A or value of TITLE to start on a new page then use the page by feature of the reporting tool.&lt;/P&gt;
&lt;P&gt;Are you asking to have multiple groups per page, but force large groups that will not fit int he space left on the page to start a new page?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jul 2020 15:29:24 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-07-14T15:29:24Z</dc:date>
    <item>
      <title>how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage returns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669134#M24258</link>
      <description>&lt;P&gt;hi, guys, who are familiar with listing rtf&amp;nbsp;output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;demand:&lt;/P&gt;
&lt;P&gt;1. repeat footnote on each page, not only in the last page.&lt;/P&gt;
&lt;P&gt;2. get the page number automatically.(some obs may have more than one line in rtf)&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="rtf.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47123i99394AE48B3FEE23/image-size/large?v=v2&amp;amp;px=999" role="button" title="rtf.png" alt="rtf.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt; format;
   value $ time10n
   a  =      1.625
   b  =      1.825
 ......
   z  =      1.625
   A  =      2.625
..... 
   X  =      2.625
   Y  =      2.625
   Z  =      2.225
  ' ' =      0.950
  '1' =     1.775
  '2' =     1.775
  ...
  '9' =     1.775
  '0' =     1.775
  '#' =     1.775
  '$' =     1.775
.....
  '&amp;lt;' =     2.025
  '&amp;gt;' =     2.025
........&lt;BR /&gt;
  '"' =     1.450
  "'" =     0.650
   OTHER = ...;
run;

&lt;/PRE&gt;
&lt;P&gt;in the template, the total rft width is 9.9 intch, so how to calculate the unit conversion for each character using times new roman (&lt;FONT face="Courier New"&gt;fontsize=&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" color="#008080"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt; pt)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 10:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669134#M24258</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-14T10:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669135#M24259</link>
      <description>&lt;P&gt;RTF does not have a page size. The actual page size is determined when the text is printed, depending on the target page format (US Letter will need more pages than European A4).&lt;/P&gt;
&lt;P&gt;Titles and footnotes are automatically inserted on each page by the user agent (MS Word, LibreOffice, etc).&lt;/P&gt;
&lt;P&gt;You need only use ODS RTF, everything else is determined when the text is prepared for printing or display.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 11:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669135#M24259</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-14T11:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669166#M24260</link>
      <description>&lt;P&gt;sample code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options orientation=landscape papersize=A4 nodate nonumber center topmargin=0.75 in leftmargin=1.0 in bottommargin=0.75 in rightmargin=1.0 in;
ods escapechar='^';
ods listing close;
ods rtf file="...\heart.rtf"   style=journal;
title j=l 'Company XXX' j=c 'Project ABC' j=r 'Page ^{thispage} of ^{lastpage}';
footnote j=c 'Confidential';

proc report data=final  nowd headline headskip 
   style(column)=[just=c asis=on]
   style(report)=[frame=above bordertopwidth=2] 
   style(header)=[borderbottomwidth=2]
   spanrows SPLIT='|'
   ;

	column page MSGID MNEMONIC LINENO LEVEL TEXT  PBUTTONS;			

	define page/order order=internal noprint;

	define MSGID/display style(column)={cellwidth=8%} flow;
	define MNEMONIC/display order style(column)={cellwidth=10%} flow;
	define LINENO/display style(column)={cellwidth=10%} flow;
	define LEVEL/display style(column)={cellwidth=8%} flow;
	define TEXT/display style(column)={cellwidth=40%} flow;
	define PBUTTONS/display style(column)={cellwidth=10%} flow;

	compute before _page_/style={font_size=10pt font_face="Times New Roman" just=left} ;
	     line "title xxxx";
	endcomp;

	break after page/page;

***add a blank line ;
   compute after LEVEL;
       line " ";
   endcomp;

    compute after _page_/style={font_size=10pt font_face="Times New Roman" just=left};
          line "foot xxx";
    endcomp;
run;

ods rtf close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how to avoid the page break like below? In some&amp;nbsp; listings, it may have more than one thousand observations/rows.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 971px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47130i0D4184B81557EA04/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 14:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669166#M24260</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-14T14:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669168#M24261</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data final;
	set sashelp.smemsg ;
	page=int(_n_/20);
run;

options orientation=landscape papersize=A4 nodate nonumber center topmargin=0.75 in leftmargin=1.0 in bottommargin=0.75 in rightmargin=1.0 in;
ods escapechar='^';
ods listing close;
ods rtf file="...\heart.rtf"   style=journal;
title j=l 'Company XXX' j=c 'Project ABC' j=r 'Page ^{thispage} of ^{lastpage}';
footnote j=c 'Confidential';

proc report data=final  nowd headline headskip 
   style(column)=[just=c asis=on]
   style(report)=[frame=above bordertopwidth=2] 
   style(header)=[borderbottomwidth=2]
   spanrows SPLIT='|'
   ;

	column page MSGID MNEMONIC LINENO LEVEL TEXT  PBUTTONS;			

	define page/order order=internal noprint;

	define MSGID/display style(column)={cellwidth=8%} flow;
	define MNEMONIC/display order style(column)={cellwidth=10%} flow;
	define LINENO/display style(column)={cellwidth=10%} flow;
	define LEVEL/display style(column)={cellwidth=8%} flow;
	define TEXT/display style(column)={cellwidth=40%} flow;
	define PBUTTONS/display style(column)={cellwidth=10%} flow;

	compute before _page_/style={font_size=10pt font_face="Times New Roman" just=left} ;
	     line "title xxxx";
	endcomp;

	break after page/page;

***add a blank line ;
   compute after LEVEL;
       line " ";
   endcomp;

    compute after _page_/style={font_size=10pt font_face="Times New Roman" just=left};
          line "foot xxx";
    endcomp;
run;

ods rtf close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;here is sample code&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 14:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669168#M24261</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-14T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669174#M24262</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;Your #1 is easy if you use the FOOTNOTE statement. Your #2 doesn't make sense to me. "Get the page number automatically", This is possible because you can use ODS ESCAPECHAR to insert page x of y into the document (page 1 of 10, page 2 of 10, etc). However, the parenthetical comment you make "some obs may have more than one line in rtf" -- what does this have to do with getting the page number? I don't understand that part. &lt;BR /&gt;&lt;BR /&gt;Every font you specify has a size and the font definition includes everything that the rendering application needs to render the document. As you might have guessed, you can get more characters on a line at 8pt font than if you use 16pt font. However, it was my understanding that most of the sizes in RTF were translated to a unit of TWIPS (twentieths of a printers point), so trying to calculate "character" with proportional spaced fonts is a pointless task. As an example, consider this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1594752012670.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47152i6D7DD14F92942D95/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1594752012670.png" alt="Cynthia_sas_0-1594752012670.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The string that I'm showing on each line has 96 characters with no spaces. As you can see, the font and font size that are used make a difference in how many characters can fit on one line. When SAS makes an RTF file, it takes all the table into account -- font characters, spaces, table lines if you have them, margins, cellspacing and cellpadding settings, etc. You can't replicate the calculation that SAS uses to create output for a paged destination.&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 18:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669174#M24262</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-07-14T18:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669175#M24263</link>
      <description>&lt;P&gt;what I want for each page , like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;demand:&lt;/P&gt;
&lt;P&gt;1. repeat footnote on each page, not only in the last page.&lt;/P&gt;
&lt;P&gt;2. get the page number automatically.(some obs may have more than one line in rtf)&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="捕获.JPG" style="width: 989px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47131i5E7E88313217EE43/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 14:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669175#M24263</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-14T14:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669184#M24264</link>
      <description>&lt;P&gt;Why do you want to reinvent the wheel, and make it squared on top?&lt;/P&gt;
&lt;P&gt;This code (that you actually use already) creates nice dynamic titles and footnotes in the RTF files, that are populated with the correct numbers once the file is opened with a word processor (LibreOffice Writer in my case):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file="/folders/myfolders/cars.rtf";
ods escapechar='^';

title j=l 'Company XXX' j=c 'Project ABC' j=r 'Page ^{thispage} of ^{lastpage}';
footnote j=c 'Confidential';

proc print data=sashelp.cars;
run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669184#M24264</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-14T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669188#M24265</link>
      <description>Thanks for your reply, Cynthia.&lt;BR /&gt;&lt;BR /&gt;Sorry, I didn't explain my question clearly.&lt;BR /&gt;&lt;BR /&gt;Now we have a lot of listings (*.rtf ) to output, but all of them  are  different for all contents, titles, footnotes,  for example,  some width of cells for one observation or one row  may have serveral lines(like sex/^n age/^n birthday),  some titles or footnotes may also have serveral lines.&lt;BR /&gt;&lt;BR /&gt;I want to find out  how many rows(observations)  in one page(rtf) , even though some rows may have serveral lines, make sure that each row is in same page without page break.&lt;BR /&gt;&lt;BR /&gt;example : &lt;BR /&gt;title1.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;BR /&gt;column A                      column B             column C                                   .............. column J   &lt;BR /&gt;17years / Female         drug A                   the patient did't sign the informed                  .....&lt;BR /&gt;/ 19980910                                                 consent form                                                 ......&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;********column A and C have two lines, while  column B has one line**************; &lt;BR /&gt;&lt;BR /&gt;footnote1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;BR /&gt;footnote2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669188#M24265</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-14T15:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669194#M24266</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 986px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47133iCE78F4FDC5DE6E9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;Sorry, I try to expalin&amp;nbsp; in a simple way:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According the dataset you have,&amp;nbsp; how to get the number of&amp;nbsp; lines in&amp;nbsp; one rtf listing page?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669194#M24266</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-14T15:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669195#M24267</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298115"&gt;@blueskyxyz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;I want to find out how many rows(observations) in one page(rtf)&amp;nbsp;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;THIS IS NOT POSSIBLE.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You cannot know the pagesize when creating the RTF, as it is dependent on the settings of the renderer, and set dynamically when the contents of the RTF file are prepared for printing or display.&lt;/P&gt;
&lt;P&gt;Let the renderer do it for you, as the code I previously posted does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669195#M24267</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-14T15:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669199#M24268</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298115"&gt;@blueskyxyz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 986px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47133iCE78F4FDC5DE6E9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;Sorry, I try to expalin&amp;nbsp; in a simple way:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According the dataset you have,&amp;nbsp; how to get the number of&amp;nbsp; lines in&amp;nbsp; one rtf listing page?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You DON'T.&amp;nbsp; &amp;nbsp;It there is too much information to fit on one page the word processor that is reading the RTF file will figure that out and start a new page for you.&lt;/P&gt;
&lt;P&gt;Please explain why it matters? If you want each value of A or value of TITLE to start on a new page then use the page by feature of the reporting tool.&lt;/P&gt;
&lt;P&gt;Are you asking to have multiple groups per page, but force large groups that will not fit int he space left on the page to start a new page?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 15:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669199#M24268</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-14T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669744#M24273</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298115"&gt;@blueskyxyz&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Wen_23 didn't want to re-invent a wheel, but SAS ODS RTF team did.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To answer Wen_23's question of Heart data example: you can try to replace 20 with 10 in your code:&lt;/P&gt;&lt;PRE class="language-sas"&gt;&lt;CODE&gt;page=int(_n_/20)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You may want to try a few other numbers, until you got satisfied results for your data.&amp;nbsp; &amp;nbsp;This is how many other pharma companies to deal with this type of problem for complicated listings, when they use SAS ODS PROC REPORT.&amp;nbsp; They almost all have used a SAS macro like RowWrap, to get a better calculation of a dynamical variable page to get a better fit of the results.&amp;nbsp; The input of this macro is your data and the proc report model, and how many records you want to display on a page.&amp;nbsp; In your example, you wanted 20, which is too big for the data.&amp;nbsp; The output is a dynamical variable of page,&amp;nbsp; resulting a better output from your proc report.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;You can google "SAS ODS RTF pagination" and you will see a few people tried to improve this matter.&amp;nbsp; But they can never solve this completely.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The root cause of the problem of pagination was directly from SAS ODS RTF team's early decision to implement PAGE in PROC REPORT!&amp;nbsp; They invented a squared wheel, along with many fixes.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS ODS RTF started about 20 years ago, based on a SAS macro that was used to generate clinical trial CSR tables about 25 years ago, and the macro later was published by someone else in SAS&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;A href="ftp://ftp.sas.com/techsup/" target="_blank" rel="noopener"&gt;ftp://ftp.sas.com/techsup/&lt;/A&gt;download/observations/obswww13/obswww13.pdf&lt;/DIV&gt;&lt;DIV&gt;A reference about this macro was mentioned in&amp;nbsp;&lt;A href="https://www.lexjansen.com/pharmasug/2003/FDACompliance/fda077.pdf" target="_blank" rel="noopener"&gt;https://www.lexjansen.com/pharmasug/2003/FDACompliance/fda077.pdf&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;The original macro didn't deal with pagination, since early tables are mostly on a single page.&amp;nbsp; But the solution was implied in the macro:&amp;nbsp; Don't bother to re-invent a wheel, Microsoft already solved the problem.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Attached is a SAS generated (basically data _null_ and put) listing/summary of COVID-19 cases by the countries in the World. For countries with regional data, the names of those regions (the first column) were randomly changed to use 10 different fonts, 5 different font sizes, and a few different shapes.&amp;nbsp; (US regional data not presented in this file).&amp;nbsp; &amp;nbsp;And you can see how well Microsoft handles pagination, without user input about it.&amp;nbsp; &amp;nbsp;BTW, you may also wander how the data fits in those 26 pages.&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thanks for your thoughts.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Jianmin&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669744#M24273</guid>
      <dc:creator>Jianmin</dc:creator>
      <dc:date>2020-07-15T22:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669929#M24274</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/63490"&gt;@Jianmin&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp; for your help and reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/63490"&gt;@Jianmin&lt;/a&gt;&amp;nbsp;, thanks for sharing the materials which really inspire me, I'll try these methods later.&lt;/P&gt;
&lt;P&gt;To resolve my problem, I had tried this method in this paper.&lt;/P&gt;
&lt;P&gt;I am glad you can understand my question.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;Good night.&lt;/P&gt;
&lt;P&gt;(&lt;A href="https://www.lexjansen.com/pharmasug/2006/TechnicalTechniques/TT12.pdf" target="_blank"&gt;https://www.lexjansen.com/pharmasug/2006/TechnicalTechniques/TT12.pdf&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:11:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669929#M24274</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-16T17:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669932#M24275</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;, I have searched and read a lot of paper and posts in order to solve my puzzle, you can see the paper shared by Janmin.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I dig out your reply in the post created serverl years before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep curious to solve my puzzle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;Night.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/669932#M24275</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-07-16T17:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: how many lines does one rtf listing page have? inch vs mm unit conversion? consider carriage ret</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/670016#M24276</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not possible to know a few things about RTF page when use ODS RTF destination, since the Renderer&amp;nbsp; takes away the control from the SAS users.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do get me wrong if you have seen my other post, that ODS RTF's invention of PAGE works wonder in many cases, but it falls in a trap that prevents it doing its jog in other cases.&amp;nbsp; Merck's implementation of the original RTF macro suffers the same as ODS RTF :&amp;nbsp;&lt;A href="https://www.lexjansen.com/pharmasug/2003/TechnicalTechniques/tt038.pdf" target="_blank"&gt;https://www.lexjansen.com/pharmasug/2003/TechnicalTechniques/tt038.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's start a 2x2 tables in a Word document: you can copy whatever content and paste it into a cell, and add a new row when you finish this table, copy and paste again and again, ..., the table will grow and grow.&amp;nbsp; &amp;nbsp;You will see how well MS Word handles the page.&amp;nbsp; No matter what contents you put in each cell.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is only possible if SAS ODS RTF didn't take control from MS Word.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, SAS ODS RTF can have an option:&amp;nbsp; Keep PAGE functionality and learn from MS Word to give SAS users an option for other cases that PAGE does not handle well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is a slightly difficult listing (only part of a 300 page+ listing) and see for yourself.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards, Jianmin&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 22:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/how-many-lines-does-one-rtf-listing-page-have-inch-vs-mm-unit/m-p/670016#M24276</guid>
      <dc:creator>Jianmin</dc:creator>
      <dc:date>2020-07-16T22:38:57Z</dc:date>
    </item>
  </channel>
</rss>

