BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Abhi_Garg
Obsidian | Level 7

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.

SHP_LOGO_2.jpg

Attached is my Output PDF file.

 

Any help will be much appreciated.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

TITLE and TITLE1 are the same thing. Your TITLE1 is overwriting your TITLE statement. 

 

View solution in original post

3 REPLIES 3
Reeza
Super User

TITLE and TITLE1 are the same thing. Your TITLE1 is overwriting your TITLE statement. 

 

Abhi_Garg
Obsidian | Level 7

**bleep** it. I have been working on this for last one hour. It never caught my eye.

 

Thank you so much @Reeza

Reeza
Super User

@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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3631 views
  • 4 likes
  • 2 in conversation