ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  This is a known interaction:

34573 - Images and URL links might be missing from PDF output when using the LASTPAGE inline functio...

  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

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:

  This is a known interaction:

34573 - Images and URL links might be missing from PDF output when using the LASTPAGE inline functio...

  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

Quentin
Super User

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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
Cynthia_sas
SAS Super FREQ

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

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2462 views
  • 0 likes
  • 2 in conversation