BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sasser27
Calcite | Level 5

Simple question I presume - For my PPT export, part of my code has a slide where a few counts are outputted into simple boxes with a label. However, the label text keeps shifting each word onto a separate line so I end up with 3+ lines for a label. I've tried options/methods that are used for ODS HTML including page size, gridded, etc. but to no avail. Any solution for this or is it better to use an alternate method  (e.g. proc report, proc tabulate, etc.)?

Here's a sample of the code:

 

ods powerpoint file = customers;
options nodate papersize=(10in. 7.5in);
ods escapechar="^"

ods powerpoint layout=titleandcontent nogtitle style=sapphire;

proc sql;
select count(distinct ID) as Leads label="Leads for August" format=comma12.
from leads_august24;
select count(distinct ID) as Customers label="Customers for August" format=comma12.
from sales_august24;
select sum(amount) as Sales label="Sales for August" format=comma12.
from sales_august24;
quit;

ods powerpoint close;
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

You could switch it into PROC REPORT which have more control in ODS.

 

ods powerpoint file ='c:\temp\temp.pptx';
options nodate;
ods escapechar="^";
data sales_august24;
 do id=1 to 100;
  amount=rand('uniform');output;
 end;
run;
ods powerpoint layout=titleandcontent nogtitle style=sapphire;

proc sql noprint;
create table want1 as
select count(distinct ID) as Leads label="Leads for August" format=comma12.
from sales_august24;
create table want2 as
select count(distinct ID) as Customers label="Customers for August" format=comma12.
from sales_august24;
create table want3 as
select sum(amount) as Sales label="Sales for August" format=comma12.
from sales_august24;
quit;
proc report data=want1 nowd ;
define _all_/display style(column)={cellwidth=5cm};
run;
proc report data=want2 nowd ;
define _all_/display style(column)={cellwidth=5cm};
run;
proc report data=want3 nowd ;
define _all_/display style(column)={cellwidth=5cm};
run;

ods powerpoint close;

Ksharp_0-1726641259802.png

 

View solution in original post

1 REPLY 1
Ksharp
Super User

You could switch it into PROC REPORT which have more control in ODS.

 

ods powerpoint file ='c:\temp\temp.pptx';
options nodate;
ods escapechar="^";
data sales_august24;
 do id=1 to 100;
  amount=rand('uniform');output;
 end;
run;
ods powerpoint layout=titleandcontent nogtitle style=sapphire;

proc sql noprint;
create table want1 as
select count(distinct ID) as Leads label="Leads for August" format=comma12.
from sales_august24;
create table want2 as
select count(distinct ID) as Customers label="Customers for August" format=comma12.
from sales_august24;
create table want3 as
select sum(amount) as Sales label="Sales for August" format=comma12.
from sales_august24;
quit;
proc report data=want1 nowd ;
define _all_/display style(column)={cellwidth=5cm};
run;
proc report data=want2 nowd ;
define _all_/display style(column)={cellwidth=5cm};
run;
proc report data=want3 nowd ;
define _all_/display style(column)={cellwidth=5cm};
run;

ods powerpoint close;

Ksharp_0-1726641259802.png

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 920 views
  • 1 like
  • 2 in conversation