The SAS Output Delivery System and reporting techniques

ODS PowerPoint how to go to a new page

Reply
Contributor
Posts: 21

ODS PowerPoint how to go to a new page

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;

 

SAS Super FREQ
Posts: 8,720

Re: ODS PowerPoint how to go to a new page

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
Contributor
Posts: 21

Re: ODS PowerPoint how to go to a new page

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

SAS Super FREQ
Posts: 8,720

Re: ODS PowerPoint how to go to a new page

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
Contributor
Posts: 29

Re: ODS PowerPoint how to go to a new page

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.

Contributor
Posts: 29

Re: ODS PowerPoint how to go to a new page

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.

Ask a Question
Discussion stats
  • 5 replies
  • 212 views
  • 1 like
  • 3 in conversation