Hi there,
trivial question, but I just can't find a suitable solution: How can I include an image (e.g. JPG) on just one slide?
To include imagefiles on every slide (for headers and footers) I use proc template as described in 53334 - Add a logo to every slide in the ODS Destination for PowerPoint , but that's not what I need.
I found a hint in a whitepaper (041-2013: A First Look at the ODS Destination for Powerpoint) that one can use the BACKGROUNDIMAGE attribute to put an image in the background of a text block (among other components), but how? And is that an appropriate way to put JPGs in your presentation?
Any other ideas would be greatly appreciated.
Cheers,
Stefan
@Stef The code for the presentations is at this page.
A First Look at the ODS Destination for PowerPoint - sasCommunity
It looks to be accomplished via the preimage option in proc report.
ods escapechar='^';
ods powerpoint file="Figure_11b.pptx" layout=twocontent;
proc report data=cali style(report)={preimage="Flag_of_California.png" bordercolor=black};
column label data;
define label / display '' style={background=#ffd700};
define data / display '';
compute data;
bg+1;
if mod(bg,2)=1 then
call define(_col_, "style", "style={background=#fff2b3}");
endcomp;
run;
Hi:
Assuming you want something like the output from a graphing procedure, you use the standard "ODS sandwich" method. For this code I get 1 slide with a table from PROC PRINT and another slide with the graph from PROC SGPLOT.
cynthia
ods powerpoint file='c:\temp\testppt.ppt' nogtitle;
proc print data=sashelp.class(obs=3);
title 'The SAS Title';
run;
proc sgplot data=sashelp.class;
vbar age/group=sex groupdisplay=cluster stat=mean response=height;
run;
ods _all_ close;
What if you're trying to include a logo or outside image, i.e. on dropbox?
Thanks for the answer, Cynthia.
Procedure-output is not exactly what I meant. I try to include a logo, a static picture in JPG (or PNG) format. It does not necessarily have to be an external file, like Reeza suggested. It might be an image which is stored locally on the server or within SAS ContentServer.
Cheers,
Stefan
Thanks for the answer, Cynthia.
Procedure-output is not exactly what I meant. I would like to include a static image, like a logo as Reeza suggested, in JPG or PNG format. It does not have to be external, might also be an image which is stored locally on the server or in SAS ContentServer.
The logo should be included in just one slide, not all of them.
Cheers,
Stefan
Well, there's a difference between using the SAS Add-in for Microsoft Office (where the image for the logo might be defined in the metadata) and using ODS PowerPoint as the destination. For the ODS PowerPoint destination and using a logo, I believe you do have to use the technique outlined in this note: 53334 - Add a logo to every slide in the ODS Destination for PowerPoint. or, open a track with Tech Support -- since the ODS PowerPoint destination is new, there might be some workarounds that Tech Support knows about.
cynthia
Thanks again. Perhaps I have to try it via Tech Support.
I think it must be possible, because there is a screenshot floating around, which seems to show exaclty what I mean. You can see it in the aforementioned whitepaper (041-2013: A First Look at the ODS Destination for Powerpoint) on page 8. The "TwoContent Layout" is shown and I am almost sure that there are images included in the example on the right hand side.
If I find a solution, I'll post it here for future reference. Nevertheless any further tips are greatly appreciated.
Cheers,
Stefan
@Stef The code for the presentations is at this page.
A First Look at the ODS Destination for PowerPoint - sasCommunity
It looks to be accomplished via the preimage option in proc report.
ods escapechar='^';
ods powerpoint file="Figure_11b.pptx" layout=twocontent;
proc report data=cali style(report)={preimage="Flag_of_California.png" bordercolor=black};
column label data;
define label / display '' style={background=#ffd700};
define data / display '';
compute data;
bg+1;
if mod(bg,2)=1 then
call define(_col_, "style", "style={background=#fff2b3}");
endcomp;
run;
Fantastic! This is exactly what I was looking for. Thanks a thousand times, Reeza.
Now that I see the code, it all makes sense.
Cheers,
Stefan
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.