BookmarkSubscribeRSS Feed
deleted_user
Not applicable
HI
can anyone tell me the best way to get page x of y while using Proc report with Pdf Output.
thanks
4 REPLIES 4
deleted_user
Not applicable
There are multiple SAS Conference papers on this that you'll find by looking on the SAS Support web site.
Lex_SAS
SAS Employee
To be more specific:
go to www.lexjansen.com and search: "page x of y" pdf
This will give you a lot of SAS proceedings that answer your question.

Lex Jansen
BrunoSilva
Quartz | Level 8
I think is this that you want:

footnote1 j=right height=1 "Page ^{thispage} of ^{lastpage}";
Cynthia_sas
SAS Super FREQ
Hi:
In order for the footnote statement to work, you must declare what the ODS ESCAPECHAR value is. ODS ESCAPECHAR is the special character that lets ODS know that you want to do something special (like use the {thispage} and/or {lastpage} Escapechar functions. Something along the lines of:
[pre]
ods pdf file='wombat.pdf';
ods escapechar='^';

footnote1 j=right height=1 "Page ^{thispage} of ^{lastpage}";
.... more code ....
ods pdf close;
[/pre]

Generally, I recommend the use of ~ (tilde) or ^ (caret) or # (sharp/pound sign) for the Escape character, because you are unlikely to have them in a title or footnote text. Or conversely, avoid any punctuation that you might find in an operating system path or title text or urls or email addresses, such as : \ / ; ! @ $ % & * < > (not a comprehensive list of all punctuation that I avoid). Mostly I use ~ or ^ or #.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 780 views
  • 0 likes
  • 4 in conversation