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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 741 views
  • 0 likes
  • 2 in conversation