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
Fluorite | Level 6
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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 623 views
  • 0 likes
  • 2 in conversation