Data visualization with SAS programming

Inserting Logo in the header of the PDF report

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

Inserting Logo in the header of the PDF report

[ Edited ]

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.

 


Accepted Solutions
Solution
a month ago
Super User
Posts: 19,080

Re: Inserting Logo in the header of the PDF report

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

 

View solution in original post


All Replies
Solution
a month ago
Super User
Posts: 19,080

Re: Inserting Logo in the header of the PDF report

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

 

Occasional Contributor
Posts: 10

Re: Inserting Logo in the header of the PDF report

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

 

Thank you so much @Reeza

Super User
Posts: 19,080

Re: Inserting Logo in the header of the PDF report


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. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 128 views
  • 3 likes
  • 2 in conversation