Help using Base SAS procedures

multiple outputs to 1 page ODS PDF

Accepted Solution Solved
Reply
Contributor
Posts: 30
Accepted Solution

multiple outputs to 1 page ODS PDF

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.

 

http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p0wtchgwnh41ctn1x...

 


Accepted Solutions
Solution
‎04-12-2016 08:37 AM
SAS Super FREQ
Posts: 682

Re: multiple outputs to 1 page ODS PDF

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

View solution in original post


All Replies
Solution
‎04-12-2016 08:37 AM
SAS Super FREQ
Posts: 682

Re: multiple outputs to 1 page ODS PDF

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

Contributor
Posts: 30

Re: multiple outputs to 1 page ODS PDF

Fantastic!! Thank you.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 286 views
  • 1 like
  • 2 in conversation