BookmarkSubscribeRSS Feed
Marina
Calcite | Level 5

I'm outputting results of PROC REPORT in PDF file and I need to have company logo and page numbers in format "Page X of Y" in this report.

I have no problem doing one or another separately, but they are not working together. I was using THISPAGE and LASTPAGE functions.

Apparently, there is known SAS problem - Problem Note 34573: Images and URL links might be missing from PDF output when using the LASTPAGE
inline function.

The solution is also available in this note. It suggest to output report twice - once in order to count number of pages and save it and the second time to create report using this number as a last page number.

Since the offered solution looks like too time consuming and referrs to an older (9.1.3) version of SAS, I wonder is there any way to do it more "elegantly"?

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

As far as I know, there is no other way to workaround this issue. If you want to check on whether there are other workarounds, Tech Support are the ones to work with. Another alternative is to generate RTF or HTML output and then distill the output after file creation. The RTF advantage is page numbering is possible with RTF. HTML does not have page numbers.

cynthia

Marina
Calcite | Level 5

Thank you, I thought so.

The idea was to use the value which the LASTPAGE function is definitely generating at some point in order for it to be printed in the output file. You would have to run report twice anyway, but at least there would be no need to save and then process SAS log.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1337 views
  • 3 likes
  • 2 in conversation