BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KalaBhairava
Quartz | Level 8

Hi All,

 

I am using below options to display page numbers in pdf document 

 
 

ODS escapechar='^';

title3   j=right  'page ^{thispage} of ^{lastpage}';

 

but getting bellow output:

<RPage 1 of @>

 

can anyone help out me to get exact page numbers 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Show the log from a code example that produces the wrong page numbers; start with the initial ODS PDF, and end with the ODS PDF CLOSE. If you use data that can't be taken out of SASHELP, provide it in a data step with datalines.

View solution in original post

4 REPLIES 4
RichardDeVen
Barite | Level 11

You will need to show more of your code, or a reproducible example.

 

The following example does number pages correctly

options papersize = (8.5in 2in);

ods pdf file="cars.pdf" style=journal; ODS escapechar='^'; title "sashelp.Cars" j=right 'page ^{thispage} of ^{lastpage}'; proc print noobs data=sashelp.cars; var make model type msrp invoice; run; ods pdf close;

PDF view capture

RichardADeVenezia_0-1599130775427.png

 

KalaBhairava
Quartz | Level 8

yes , initially it came but what happened I don't know suddenly it's did't work and not generating page numbers, do we have any other options to generate page numbers?

 

If I use below options it printing  like page 1,  but I want it as page 1 of 4

page ^{thispage}

 

 

Kurt_Bremser
Super User

Show the log from a code example that produces the wrong page numbers; start with the initial ODS PDF, and end with the ODS PDF CLOSE. If you use data that can't be taken out of SASHELP, provide it in a data step with datalines.

KalaBhairava
Quartz | Level 8

Thank you very much for your message, It's working fine now , I will give you screen shot of log if I face same issue again

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1481 views
  • 0 likes
  • 3 in conversation