Hello Folks,
I am trying to insert a logo in the Header of my report. Despite there is no error in my code, I can't see any logo in my pdf report.
Following is my SAS code:
Data test;
input name$ age;
datalines;
Dan 27
Bob 25
;
run;
%let tdate = %sysfunc(date(),mmddyy10.);
%let ttime= %sysfunc(time(),timeampm11.);
proc template;
define style Styles.biggerfont;
parent = Styles.printer;
replace fonts /
'TitleFont2' = ("Times Roman",12pt,Bold Italic)
'TitleFont' = ("Times Roman",13pt,Bold Italic)
'StrongFont' = ("Times Roman",10pt,Bold)
'EmphasisFont' = ("Times Roman",10pt,Italic)
'FixedEmphasisFont' = ("Courier",9pt,Italic)
'FixedStrongFont' = ("Courier",9pt,Bold)
'FixedHeadingFont' = ("Courier",9pt,Bold)
'BatchFixedFont' = ("SAS Monospace, Courier",15pt)
'FixedFont' = ("Courier",9pt)
'headingEmphasisFont' = ("Times Roman",11pt,Bold Italic)
'headingFont' = ("Times Roman",13pt,Bold)
'docFont' = ("Times Roman",12pt);
end;
run;
ods escapechar='^';
options nodate nonumber orientation=portrait;
ods pdf file="C:\Users\garga\Documents\SAS POC\Creating PDF\test.pdf" STYLE= STYLES.BIGGERFONT;
proc report data = test STYLE(REPORT) = [RULES = NONE FRAME = VOID FONT_SIZE = 12PT];
title j=left "^S={preimage='C:\Users\garga\Documents\SAS POC\Creating PDF\SHP_LOGO_2.jpg'}";
title1 H=4.0 J=C F='Times New Roman' "Marshfield Clinic";
title2 H=2.0 J=C F='Times New Roman' "RVU credits and Eye Codes";
title3 H=2.0 J=C F='Times New Roman' "As of &tdate &ttime";
define name /group 'Name' style(header)=[background = LIGHTGRAY font_size = 12pt];
define age /'Age' style(header)=[background = LIGHTGRAY font_size = 12pt];
compute before Name / style=[font_size =1pt background = cxBDB76D];
line ' ';
endcomp;
footnote1 H=1.5 J=L F='Times New Roman' "Creation Date: &tdate";
footnote2 h=8pt f=Arial j=right '^{thispage}';
run;
ods pdf close;
ods listing;
Can someone tell me why am I not able to see the image?
Below is the logo image that I am trying to add in the header.
Attached is my Output PDF file.
Any help will be much appreciated.
Thanks in advance.
TITLE and TITLE1 are the same thing. Your TITLE1 is overwriting your TITLE statement.
TITLE and TITLE1 are the same thing. Your TITLE1 is overwriting your TITLE statement.
**bleep** it. I have been working on this for last one hour. It never caught my eye.
Thank you so much @Reeza.
@Abhi_Garg wrote:
**bleep** it. I have been working on this for last one hour. It never caught my eye.
Thank you so much @Reeza.
No problem, glad it was that easy.
FYI - I spent four hours this weekend, debugging something that turned out to be a case error, because R variables are case sensitive. We all get there some days.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.