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

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

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