BookmarkSubscribeRSS Feed
SanaMohanReddy
Calcite | Level 5

Hi Everyone,

 

Below is my code:

 

ods powerpoint file = "path/slide1.pptx";

 

proc sql;

select dept, sum(sales) sales, sum(repossessions) as repossesions, sum(losses) as loss, sum(profit) as profit, sum(accounts) as no_of_accounts

from table table1

group by dept;

quit;

 

ods powerpoint close;

 

I am expecting the complete output in a single slide, but the initial two columns in first slide, next two columns in 2nd slide and the rest in 3rd slide. the tabular data is flowing into multiple slide instead of a single slide.

 

Could you please or guide

 

I have attached a zip folders which has got 3 slides. Need to show in those formats.

5 REPLIES 5
Quentin
Super User

I would suggest using PROC REPORT, or maybe even just PROC PRINT to generate the report.  It gives you control over font size, column widths, etc.  You can still use PROC SQL to calculate the values, then use PROC REPORT to print them out.  

 

@JaneEslinger has a bunch of great papers on ODS PowerPoint, including one specifically on the topic of how to make content fit a slide:
https://www.lexjansen.com/pharmasug/2018/DV/PharmaSUG-2018-DV01.pdf

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
Ksharp
Super User

I got no problem at all. Maybe there are some code you did not show?

 

 

ods powerpoint file = "c:\temp\slide1.pptx";

proc sql;
select sex length=8, sum(weight) as sales, sum(weight) as repossesions, sum(weight) as loss, sum(weight) as profit, sum(weight) as no_of_accounts
from sashelp.class
group by sex;
quit;

ods powerpoint close;

 

Ksharp_0-1725413280225.png

 

SanaMohanReddy
Calcite | Level 5

Hi, Thank you. But i dont have any other code. i tried using proc print directly but the columns are flowing into multiple slides. Not sure of the issue

ballardw
Super User

This sounds like your output is using LAYOUT=twocontent.

 

See if using

ods powerpoint file = "path/slide1.pptx" layout=titleandcontent;

helps.

 

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 5 replies
  • 395 views
  • 3 likes
  • 4 in conversation