Hi I've been use this _null_ statement to go to a new slide in ODS PowerPOint. However, some papges do not work...
data _null_ ;
dcl odsout obj();
run;
The code below overlaps in one slide even though there is the _null_ statement. Could anyone help on this? Am I missing something?
Momi
ods layout gridded x = 0 pct y = 25 pct;
ods region;
proc odstext;
P ' ';
P 'ods graphics / width = 4.5 in height = 4 in;';
P 'ods layout gridded columns = 2 x = 0 pct y = 10 pct;' ;
P '^{super }ods region; /* Graph 1 */' ;
P '^{super }proc sgplot --- for Male';
P '^{super }ods region; /* Graph 2 */' ;
P '^{super }proc sgplot --- for Female';
P 'ods layout end;';
run;
ods layout end;
data _null_ ;
dcl odsout obj();
run;
title; footnote;
ods layout gridded columns = 2 ;
ods graphics / width = 4.5 in height = 4 in;
title1 "2 Graphs Per Slide";
ods region; /* Graph 1 */
proc sgplot data = sashelp.class;
where sex = "M";
scatter x = height y = weight ;
title "Male: Height vs. Weight";
run;
ods region; /* Graph 2 */
proc sgplot data = sashelp.class;
where sex = "F";
scatter x = height y = weight ;
title "Male: Height vs. Weight";
run;
ods layout end;
Hi,
Thank you for your reply. I actaully refere to the paper and I was able to create the gaphs. However, these graphs overlap on the previous slide even though I have a "data _null_; dcl odsout obj(); run;" statement. Please let me know if I am missing something.
Thank you,
Momi
You are not alone, I'm having the same issue.
I have a gridded layout with 2 columns and 2 rows, my first region is a graph, my second region is another graph, my third region is a tabel and I've got it set to column_span=2. That should fill the layout and move to another page, but I'm getting floating point errors and just garbage after that. If I skip the code for the first, then the code produces the second page perfectly, and the third gives me floating point erros and then garbage.
So I too added the data _null_ code from that same paper, and now I get the stuff from the second page overlapping on the first too.
I'm having issues replicating this with sashelp data that I can share here unfortunately.
My graphs are sgplot and my table is proc report.
The crazy thing is I can produce each page perfectly, just as long as I only do one page per powerpoint deck.
I got a reply back from SAS support and it was from the author of the paper mentioned on here.
She replaced the data _null_ with this:
ods powerpoint layout=titleslide;
ods powerpoint layout=_null_;
I don't have time right now to test it myself, but I wanted to pass it along in case it helps others who stumble on this same issue.
Also, sounds like the next update of SAS will have a better/simpler way to initiate a new slide.
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!
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.