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 is hosting free webinars!
Next up: Troy Martin Hughes presents Calling Open-Source Python Functions within SAS PROC FCMP: A Google Maps API Geocoding Adventure on Wednesday April 23.
Register now 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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1321 views
  • 3 likes
  • 4 in conversation