BookmarkSubscribeRSS Feed
Intruder89
Calcite | Level 5

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!

1 REPLY 1
HB
Barite | Level 11 HB
Barite | Level 11

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.

 

 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 623 views
  • 0 likes
  • 2 in conversation