Ods layout isn't supported in ODS RTF.
I have tried ods region column_span=3 style={padding=0 margin=0}; to create 3 columns then do ods region column_span=1 style={width=4in padding=0 margin=0 just=l};
I have tried many things by I can't get the charts side by side.
I have a long code within ods html which contains proc ghart, proc sgplot etc. Some are side by side in the html file.
How can I recreate this within ods rtf?
You want this ?
%let path= c:\temp ;
options nodate nonumber;
ods listing gpath="&path." style=htmlblue image_dpi=300;
ods graphics /width=3in height=3in reset=index noborder imagename='FAS' outputfmt=png ;
proc sgplot data=sashelp.class noautolegend ;
reg x=height y=weight/cli clm;
run;
ods graphics /width=3in height=3in reset=index noborder imagename='PPS' outputfmt=png;
proc sgplot data=sashelp.class;
scatter x=age y=weight;
run;
ods graphics /width=3in height=3in reset=index noborder imagename='SS' outputfmt=png ;
proc sgplot data=sashelp.class ;
ellipse x=height y=weight/group=sex;
scatter x=height y=weight/group=sex;
run;
ods graphics /width=3in height=3in reset=index noborder imagename='S' outputfmt=png;
proc sgplot data=sashelp.class;
scatter x=age y=weight/group=sex datalabel=name;
run;
ods rtf file="&path.\want.rtf" style=minimal dpi=300 ;
data x;
x=' ';y=' ';output;
x=' ';y=' ';output;
run;
title;
proc report data=x nowd noheader style={outputwidth=100% };
column x y;
define x/display;
define y/display;
compute y;
n+1;
if n=1 then do;
call define('x','style','style={ preimage="&path\FAS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
call define('y','style','style={ preimage="&path\PPS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
end;
if n=2 then do;
call define('x','style','style={ preimage="&path\SS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
call define('y','style','style={ preimage="&path\S1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
end;
endcomp;
run;
ods rtf close;
You want this ?
%let path= c:\temp ;
options nodate nonumber;
ods listing gpath="&path." style=htmlblue image_dpi=300;
ods graphics /width=3in height=3in reset=index noborder imagename='FAS' outputfmt=png ;
proc sgplot data=sashelp.class noautolegend ;
reg x=height y=weight/cli clm;
run;
ods graphics /width=3in height=3in reset=index noborder imagename='PPS' outputfmt=png;
proc sgplot data=sashelp.class;
scatter x=age y=weight;
run;
ods graphics /width=3in height=3in reset=index noborder imagename='SS' outputfmt=png ;
proc sgplot data=sashelp.class ;
ellipse x=height y=weight/group=sex;
scatter x=height y=weight/group=sex;
run;
ods graphics /width=3in height=3in reset=index noborder imagename='S' outputfmt=png;
proc sgplot data=sashelp.class;
scatter x=age y=weight/group=sex datalabel=name;
run;
ods rtf file="&path.\want.rtf" style=minimal dpi=300 ;
data x;
x=' ';y=' ';output;
x=' ';y=' ';output;
run;
title;
proc report data=x nowd noheader style={outputwidth=100% };
column x y;
define x/display;
define y/display;
compute y;
n+1;
if n=1 then do;
call define('x','style','style={ preimage="&path\FAS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
call define('y','style','style={ preimage="&path\PPS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
end;
if n=2 then do;
call define('x','style','style={ preimage="&path\SS1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
call define('y','style','style={ preimage="&path\S1.png" bordertopcolor=white borderbottomcolor=white borderrightcolor=white borderleftcolor=white}');
end;
endcomp;
run;
ods rtf close;
That's terrific! I posted a complaint on the lack of flexibility of PROC SGPANEL in the community before. Your code is more complex than the code a usual SGPANEL procedure entails, but it's cool.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.