Hi:
I believe that in-line formatting (such as {thispage}) works for RTF in SAS 9.2, but not for PDF (yet). The reason that using in-line formatting works at all in titles for RTF is that there is a NOGTITLE and NOGFOOTNOTE option for RTF destination, that tells SAS/GRAPH to let ODS control the title and footnote. PDF does not currently have those options (although it is planned for SAS 9.3). You can find the description of the GTITLE option for RTF here:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002233360.htm#a003137604
(Of course, there are no page numbers in HTML output, so {thispage} would not ever work in ODS HTML for that reason. But other in-line formatting will work in HTML and NOGTITLE will work for HTML, as well.)
So, you can't use {thispage} with ODS PDF in SAS 9.2 -- however a simple NUMBER system option will work with SAS/GRAPH in SAS 9.2 for ODS PDF, as shown in the program below. When I run the code, I get 3 pages of output, one for each BY group from the GCHART and the page number is in the upper right hand corner of each page.
cynthia
[pre]
ods listing close;
options nodate number pageno=1;
proc sort data=sashelp.shoes out=shoes;
where region in ('Asia', 'Pacific', 'Canada');
by region product;
run;
ods pdf file='c:\temp\sasgraf_page_option.pdf';
proc gchart data=shoes;
by region;
title 'Use NUMBER System Option';
vbar product / sumvar=sales;
run;
quit;
ods pdf close;
title; footnote;
** Compare RTF output;
ods listing close;
options nodate nonumber;
ods rtf file='c:\temp\sasgraf_nogtitle_option.rtf' nogtitle;
ods escapechar='^';
proc gchart data=shoes;
by region;
title j=c 'RTF with NOGTITLE' j=r 'Page ^{thispage}';
vbar product / sumvar=sales;
run;
quit;
ods rtf close;
[/pre]