The SAS Output Delivery System and reporting techniques

Current page number and line number

Reply
Occasional Contributor
Posts: 14

Current page number and line number

Hi All,

  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.

For example:

  ODS RTF file = "text.rtf" ;

         

          proc print data=one;

          run;

          proc print date=two;

          run;

/* I want to know the page number and line number where the above print statement ended... */

         

            proc print date=three;

          run;

    

     ODS CLOSE;

Thanks in advance. 

SAS Super FREQ
Posts: 8,868

Current page number and line number

Posted in reply to kishore415

Hi:

  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.

cynthia

Occasional Contributor
Posts: 14

Current page number and line number

Posted in reply to Cynthia_sas

I can expect if I fetch all rows from the dataset but in my case am using a where conditon in proc print

Like..

  Proc print data=one;

where id in( 1,2,3);

run;

So I cant guess the total no of observation fetched....

SAS Super FREQ
Posts: 8,868

Current page number and line number

Posted in reply to kishore415

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.

cynthia

Occasional Contributor
Posts: 14

Current page number and line number

Posted in reply to Cynthia_sas

HI

 

   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.

Ask a Question
Discussion stats
  • 4 replies
  • 259 views
  • 0 likes
  • 2 in conversation