BookmarkSubscribeRSS Feed
Andyshen
Calcite | Level 5
Hi All,

I'm working on a stored process that need to display several charts on one page. I'm using the greplay statement to design the layout. But I couldn't find a way to hide the previous charts that I generated. I could either get all the charts shown at the same time or none of them.

My code is as follows:

goptions device=gif goutmode= replace;
ods listing close;
ods graphics on;
Title;
Title1 'XXX';

PROC GCHART DATA =a.dataset gout=b;
PIE seg /
SUMVAR=segcount
TYPE=SUM
NOLEGEND
SLICE=INSIDE
PERCENT=INSIDE
VALUE=NONE
OTHER=4
OTHERLABEL="Other"
COUTLINE=BLACK
DISCRETE
explode=&selseg;
run;

PIE seg /
SUMVAR=tbrseg
TYPE=SUM
NOLEGEND
SLICE=INSIDE
PERCENT=INSIDE
VALUE=NONE
OTHER=4
OTHERLABEL="Other"
COUTLINE=BLACK
DISCRETE
explode=&selseg;
run;quit;

goption goutmode = append;

ods listing;

proc greplay igout=b gout=c
tc=tempcat nofs;
template=grftmplt;
tdef grftmplt

1/llx=20 lly=50
ulx=20 uly=90
urx=60 ury=90
lrx=60 lry=50


2/llx=40 lly=50
ulx=40 uly=90
urx=80 ury=90
lrx=80 lry=50
;

template grftmplt;

list template;

treplay 1:gchart
2:gchart1
;
quit;

I'm using the ods listing to hide the charts, but by doing that I couldn't get the charts in gout as well. Anyone knows how to hide the previous graph and only display the page after layout design?
2 REPLIES 2
Andre
Obsidian | Level 7
Alternate
goptions nodisplay ; .....
goptions display;
proc greplay...

but i have no experience of stored process

Andre Message was edited by: Andre
Andyshen
Calcite | Level 5
It works, thank you so much!

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
  • 2 replies
  • 735 views
  • 0 likes
  • 2 in conversation