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