Hello, I was reading the information at the below link for positioning multiple graphs on one PDF page. I have 2 questions. Is the approach outlined in the link below (using horgin= and vorgin=) will that work as well for Proc Tabulate or Proc Means outputs? Then secondly is there any advantage gained in control of th eset up using ODS PowerPoint vs ODS PDF. Thank you.
Hi
With SAS 9.4 I would go for ODS LAYOUT, this will give you a lot of flexibility on where on the page you want to position your output.
See a sample program below
options
orientation=portrait
papersize="ISO A4"
topmargin=2cm
bottommargin=2cm
leftmargin=2.5cm
rightmargin=1.5cm
nodate
nonumber
nocenter
;
title;
footnote;
ods pdf file="c:\temp\sample.pdf" nogtitle nogfootnote;
ods graphics / outputfmt=pdf;
title "Overall titel";
footnote "Overall footnote";
ods layout absolute;
ods region x=0cm y=0cm height=6cm style={background=cx4dbfbc};
title "proc print 1";
proc print
data=sashelp.class(obs=5)
style(report) = { width=100pct }
;
where sex = "F";
run;
title;
ods region x=5cm y=6.5cm height=10cm width=10cm style={background=cxd2691e};
title "proc sgplot";
ods graphics / height=8cm width=10cm;
proc sgplot data=sashelp.cars;
vbar type / group=Origin;
run;
ods region x=0cm y=17cm height=7cm style={background=cxffd700};
title "proc print 2";
proc print
data=sashelp.class(obs=5)
style(report) = { width=100pct }
;
where sex = "M";
run;
title;
ods layout end;
ods pdf close;
Bruno
Hi
With SAS 9.4 I would go for ODS LAYOUT, this will give you a lot of flexibility on where on the page you want to position your output.
See a sample program below
options
orientation=portrait
papersize="ISO A4"
topmargin=2cm
bottommargin=2cm
leftmargin=2.5cm
rightmargin=1.5cm
nodate
nonumber
nocenter
;
title;
footnote;
ods pdf file="c:\temp\sample.pdf" nogtitle nogfootnote;
ods graphics / outputfmt=pdf;
title "Overall titel";
footnote "Overall footnote";
ods layout absolute;
ods region x=0cm y=0cm height=6cm style={background=cx4dbfbc};
title "proc print 1";
proc print
data=sashelp.class(obs=5)
style(report) = { width=100pct }
;
where sex = "F";
run;
title;
ods region x=5cm y=6.5cm height=10cm width=10cm style={background=cxd2691e};
title "proc sgplot";
ods graphics / height=8cm width=10cm;
proc sgplot data=sashelp.cars;
vbar type / group=Origin;
run;
ods region x=0cm y=17cm height=7cm style={background=cxffd700};
title "proc print 2";
proc print
data=sashelp.class(obs=5)
style(report) = { width=100pct }
;
where sex = "M";
run;
title;
ods layout end;
ods pdf close;
Bruno
Fantastic!! Thank you.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.