BookmarkSubscribeRSS Feed
astein2
Calcite | Level 5

I am trying to insert an image into a PowerPoint, but the step used to insert the image is causing text on the slide to shift down.  Any suggestions?

 

Here is my code:

%macro ppt_slide_1;
	/*background*/
	ods powerpoint options(backgroundimage="ENTER PATH LOCATION\Background test.png");

	ods layout gridded rows=2;
		ods region row=1;
	proc odstext;
		p " This is the title " / style=[just=left fontweight=bold fontsize=32pt padding=0pt];
		p " " / style=[just=left fontweight=bold fontsize=32pt padding=0pt];
	run;

	ods region row=2;
	proc report data=sas.&sas_table_name._b nowd style={preimage="ENTER PATH LOCATION\performance.png"};
	column grade;
	define grade/ noprint;
	run;
	ods layout end;

%mend ppt_slide_1;


ods powerpoint file="ENTER PATH LOCATION\Example PPT.pptx";
%ppt_slide_1;
ods powerpoint close;

 

When I run the code without the proc report step, the text appears at the top of the page where it should.

Good image.png

When I include the proc report step, the text is shifted down the page. Notice that it runs into the line that is part of the background image.

Bad image.png

 

I have attempted many fixes without success:

1.) Added a height statement to the ods region in an attempt to force the rows to be a specific height.  No affect.

2.) Attempted to use a title statement instead of an odstext.  Although this appears to 'fix' the issue, it doesn't really.  I have other slides where I need text on the page in a different position than the title.  The images are still shifting the location of the text there. 

3.) Attempted to use absolute X and Y positions as part of the ods region statement.  No affect.

4.) I have thought about using the layout=titleandcontent statement, but my slides will contain more than one image/textbox.  Above I have provided simplified code, but in my full code I am using a layout gridded with 3 rows and 3 columns.

 

Ideas?


Title Background test.png
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
ODS POWERPOINT is new, so it is probably best to work with Tech Support on this one. They will need to see ALL your code, not just the snippet of macro code that you attached here and probably some test data, as well.
cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1093 views
  • 0 likes
  • 2 in conversation