BookmarkSubscribeRSS Feed
Corinthian94
Obsidian | Level 7

Hi all,

 

I am trying to create a SAS report that has some pages with 2 columns with one centered header for the section. Code and output below:

 

ods pdf startpage = now;
ods pdf columns = 2;
ODS TEXT = "~{newline 1}";
ODS TEXT = "~{STYLE[JUST = C FONTWEIGHT = BOLD FONTSIZE = 12PT]Study Stop}";
ODS TEXT = "~{newline 1}"; 
 
proc sort data=current.status_file; by descending stop_date; run;
PROC REPORT DATA = current.status_file NOWD HEADLINE BOX SPLIT = "\";
column study_id stop_date ss_reason ssreas_othersp withdraw_reason;
where ss_reason ne .;
 
define study_id / center "ID";
define stop_date / center order = internal "Stop Date" format = MMDDYY10.;
define ss_reason / display center "Reason" format=ss.;
define ssreas_othersp / display center "Other reason";
define withdraw_reason / display center "Withdrawal Reason";
 
run;
ods pdf close;

 

Corinthian94_0-1722521145713.png

 

I am able to get two columns using ODS PFF columns=2, but this then puts the header over the first column instead of at the center at the top of the page. Is there a way to center this in the middle of the two columns? I have tried to find something but have not had any luck, and anything I try gets rid of the two columns which is more important for the formatting than the title being in the middle. Thanks in advance for your help!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 0 replies
  • 68 views
  • 0 likes
  • 1 in conversation