Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!

Ods Layout Centering with Columns

Reply
Senior User
Posts: 1

Ods Layout Centering with Columns

So I am not super familiar with ODS, but I am trying to output a proc freq output and proc print into a pdf.  I currently have the data so that it is appearing in 2 columns.  Below is the code that is working so far:

 

ods pdf file="Pathway.pdf" Style=Meadow startpage=never columns=2;
TITLE "Template";

proc freq data = final;
where district = 'XXXX';
table Status/missing list nopercent;
run;

Proc Print Data=Associate_Breakout noobs;
Run;

ODS PDF CLOSE;
TITLE;

 

What I want to do, is center the proc freq at the top (Since it is a smaller overview of the rest of the data) and the have the proc print be in 2 columns beneath it?  Is this possible?

 

Thanks in advance!

Super Contributor
Super Contributor
Posts: 269

Re: Ods Layout Centering with Columns

Posted in reply to Intruder89

You might try regions:

 



data end;
   input Plan;
datalines;
1
1
1
1
2
2
2
2
3
3
3
3
4
4
4
4
;
run;

ods pdf file="file.pdf" notoc;

ods layout start 
           x=0in y=0in 
           width=8.5in height=11in;

* region 1, as wide as the page, half the height, essentially one column; 
ods region x=0in y=0in 
             width=8.5in height=5.5in;

proc freq data= end;
tables plan;
run;

* region 2, half the page width, starts halfway down, the left of two; 
ods region x=0in y=5.5in
             width=4in height=5.5in;

proc freq data= end;
tables plan;
run;

* region 3, half the page width, starts halfway down and halfway across, the right of two; 
ods region x=4.25in y=5.5in
             width=4in height=5.5in;

proc freq data= end;
tables plan;
run;

ods layout end; 
ods pdf close; 

You can tweak the measurements to adjust sizes and move things around.  Maybe kill region 3 and see if stuff from region 2 spills over to two columns.  Or maybe you can explicitly designate two columns in that region.  I don't know. Experiment.

 

 

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 131 views
  • 0 likes
  • 2 in conversation