Hi,
I'm using ODS PDF to create report with a watermark, per: http://support.sas.com/kb/24/319.html
This has been working for a while, then it broke suddenly. And after slamming my head against the keyboard for a couple hours last night, it looks like what broke it was the addition of a footnote statement that had in-line formatting!
So here is working code:
proc template; define style watermark; parent=styles.printer; style header from header / background=_undef_; style body from document / background=_undef_ backgroundimage="D:\junk\clocks.jpg"; end; run; ods pdf file="test.pdf" style=watermark; footnote1 "I have a simple footnote"; proc report data = sashelp.class nowd; run; ods pdf close;
But if I replace the footnote to have one with in-line formatting to add page x of y, the watermark disappears!
ods escapechar='^'; footnote1 "Page ^{thispage} of ^{lastpage}";
Anyone care to replicate the result, and better yet maybe explain why this is happening?
I'm on SAS 9.3, Win XP.
Thanks,
--Q.
Hi:
This is a known interaction:
There are some workarounds listed in the note. You might consider making an RTF file and then doing the creation to PDF from there.
cynthia
Hi:
This is a known interaction:
There are some workarounds listed in the note. You might consider making an RTF file and then doing the creation to PDF from there.
cynthia
Thanks so much Cynthia, that's definitely what I'm seeing.
Where were you last night, when I was banging my ahead against the keyboard.:smileygrin:
This morning, I started debugging from scratch with a simpler example, and started commenting out code, thinking "Well, it couldn't be the footnote statement", and there it was.... Which is a lesson it feels like I re-learn every 3 months. When faced with odd results, debug calmly and methodically.... Last night I had 100 different theories for what could have been wrong (my ods PATH is being reset somewhere, there is a problem with my PROC TEMPLATE code, the .jpg file is corrupted, I should restart the SAS session, etc etc), but was too tired and frustrated to just debug.
--Q.
Hi, Quentin:
Sorry about the head banging. I've done my share of head banging and of calm debugging and in my opinion, the calm debugging (aided by a search of Tech Support notes on support.sas.com), is the winner in solving problems and also, no bruises on the forehead! 😉
cynthia
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.
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.