08-06-2012 05:50 PM
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
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"?
08-06-2012 10:10 PM
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.
08-07-2012 10:19 AM
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.