The SAS Output Delivery System and reporting techniques

I need ODS PowerPoint to go to a new slide

Reply
Contributor
Posts: 29

I need ODS PowerPoint to go to a new slide

So this is clearly not producing what I want. To me, this should fill up my first layout with two graphs and a table, then move to a new slide with two more graphs and a table.

 

options nodate papersize=(13.33in 7.5in);
ods graphics on/ reset border=off ANTIALIASMAX=100000 ATTRPRIORITY= COLOR SCALE = on;
ods powerpoint FILE="&path./&YYYYMM.\documents/testing.pptx" style=styles.mystyle;
ods graphics /HEIGHT = 4.4in WIDTH = 5.5in;

 

/*begin first slide*/

title "IBM";/*the slide title*/
ods layout gridded columns=2 rows=2;
ods region;/*top left*/
title "high/low";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="IBM"));
series x=date y=high;
series x=date y=low;
run;
ods region;/*top right*/
title "close";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="IBM"));
series x=date y=close;
run;

ods region column_span=2 ;/*need to span both columns*/
proc print data=sashelp.stocks(where=(stock="IBM") obs=3) ;
run;
title;
ods layout end;

 

/*second slide*/

title "Intel";/*the slide title*/
ods layout gridded columns=2 rows=2;
ods region;/*top left*/
title "high/low";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="Intel"));
series x=date y=high;
series x=date y=low;
run;
ods region;/*top right*/
title "close";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="Intel"));
series x=date y=close;
run;

ods region column_span=2 ;/*need to span both columns*/
proc print data=sashelp.stocks(where=(stock="Intel") obs=3) ;
run;
title;
ods layout end;


ods _all_ close;

 

But if I add:

data _null_;
dcl odsout obj();
run;

between the two layouts as recommended in this paper: support.sas.com/resources/papers/proceedings16/SAS5443-2016.pdf

 

I get everything garbled on the first page and no second page.

 

that code is as follows:

 

options nodate papersize=(13.33in 7.5in);
ods graphics on/ reset border=off ANTIALIASMAX=100000 ATTRPRIORITY= COLOR SCALE = on;
ods powerpoint FILE="&path./&YYYYMM.\documents/testing.pptx" style=styles.mystyle;
ods graphics /HEIGHT = 4.4in WIDTH = 5.5in;

title "IBM";/*the slide title*/
ods layout gridded columns=2 rows=2;
ods region;
title "high/low";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="IBM"));
series x=date y=high;
series x=date y=low;
run;
ods region;
title "close";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="IBM"));
series x=date y=close;
run;

ods region column_span=2 ;/*need to span both columns*/
proc print data=sashelp.stocks(where=(stock="IBM") obs=3) ;
run;
title;
ods layout end;

data _null_;
dcl odsout obj();
run;

title "Intel";/*the slide title*/
ods layout gridded columns=2 rows=2;
ods region;
title "high/low";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="Intel"));
series x=date y=high;
series x=date y=low;
run;
ods region;
title "close";/*the graph title*/
proc sgplot data=sashelp.stocks(where=(stock="Intel"));
series x=date y=close;
run;

ods region column_span=2 ;/*need to span both columns*/
proc print data=sashelp.stocks(where=(stock="Intel") obs=3) ;
run;
title;
ods layout end;


ods _all_ close;

 

What am I missing? How do I get my three regions on the first slide in one layout, then move to the next slide for the next three regions in another layout?

Super User
Posts: 11,343

Re: I need ODS PowerPoint to go to a new slide

Posted in reply to ANWZimmerman

I am a little concerned with this bit:

FILE="&path./&YYYYMM.\documents/testing.pptx"

why do you mix / and \ in the file name?

Ask a Question
Discussion stats
  • 1 reply
  • 152 views
  • 0 likes
  • 2 in conversation