
How to display pageno in output header in format ‘page x of y’ in ods —
Well this is pretty easy and can be done using the title statement itself.This always works in RTF but may not work in pdf and html..
Note the use of ods ecsapechar statement .The escapechar(or escapecharacter)is used to convey information to ods as which symbol is to be used as escapecharacter.we can use any special character as escapecharater eg #,~ etc….
ods listing close;
ods escapechar='^';
title1 "Page ^{thispage} of ^{lastpage}";
ods rtf file='c:\users\bobby\desktop\file.rtf';
ods pdf file='c:\users\bobby\desktop\file.pdf';
Proc print data=sasuser.admit n='total obs=';
Run;
ods _all_ close;
ods listing;