saslabelpowerpointproc-sql

SAS ODS Powerpoint - Forcing proc sql label text to stay on one line


Likely a simple question - I'm exporting to PPT for a slide where a few counts are outputted into simple boxes with a label via proc sql. However, the label text keeps shifting each word onto a separate line so I end up with 3+ lines of a label for each count. I've tried options/methods that are used for ODS HTML including page size which didn't affect it Any solution for this or is it better to use an alternate method (e.g. proc report, proc tabulate, etc.)?

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;

Solution

  • Either change the width on the FORMAT specification to be wide enough to have the complete title. For example use COMMA16. for "Leads for August" since that is 16 characters long.

    Or replace the spaces with non-breaking spaces.

    data _null_;
      call symputx('august',translate('Leads for August','A0'x,' '));
      call symputx('september',translate('Leads for September','A0'x,' '));
    run;
    
    
    proc sql;
    select count(distinct name) as Leads label="&august" format=comma12.
    from sashelp.class;
    select count(distinct name) as Leads label="&september" format=comma12.
    from sashelp.class;
    quit;
    

    enter image description here