06-30-2011 08:08 AM
Is there any way to know the last page number and line number of that page where the last "proc print" statement written to the rtf file in ODS RTF.
ODS RTF file = "text.rtf" ;
proc print data=one;
proc print date=two;
/* I want to know the page number and line number where the above print statement ended... */
proc print date=three;
Thanks in advance.
06-30-2011 09:58 AM
With ODS RTF, SAS does not know how many pages a particular RTF file will have. ODS allows Word to perform the pagination. You can approximately guess what the page number will be (for example, if you know that on a portrait orientation, using the default RTF style, you can fit approximately 35 rows/observations per page, you could divide the total number of observations by 35 and then add a fudge factor for titles and footnotes and come up with the approximate page number.
BTW, your CLOSE statement needs to be either ODS RTF CLOSE; or ODS _ALL_ CLOSE; in order to completely close the RTF file that you have opened.
06-30-2011 10:05 AM
I can expect if I fetch all rows from the dataset but in my case am using a where conditon in proc print
Proc print data=one;
where id in( 1,2,3);
So I cant guess the total no of observation fetched....
06-30-2011 12:30 PM
You at least know that every PROC PRINT will -start- a new page; but you can't capture, ahead of time, the page number for either the RTF or the PDF file that you create.
07-01-2011 12:22 AM
I know that every proc print starts on a new page..but I dont know how many pages that proc is printed.I dont understand ahead of time,its acutally after the completion of the previous proc I wanted to know the page number.