BookmarkSubscribeRSS Feed
momi
Obsidian | Level 7

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;

 

5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi, My suggestion is that you review the code from this paper: http://support.sas.com/resources/papers/proceedings16/SAS5443-2016.pdf which looks very similar to your code on pages 6/7.

If the EXACT same code on your system does NOT produce the same results as shown in the paper, and, you are running the correct version of SAS, then I would suggest you open a track with Tech Support.

cynthia
momi
Obsidian | Level 7

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

Cynthia_sas
SAS Super FREQ
Hi:
If the same code on your system does NOT produce the same results as shown in the paper, and, you are running the correct version of SAS, then I would suggest you open a track with Tech Support.

cynthia
ANWZimmerman
Obsidian | Level 7

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.

ANWZimmerman
Obsidian | Level 7

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1597 views
  • 1 like
  • 3 in conversation