BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Leo9
Quartz | Level 8

I am using code below but no matter what I do the titles are not aligning as per j= option. They are all getting aligned in the center for some reason. I want some align to left and some to center and some to right.

 

ods listing close;
ods escapechar='!';
ods rtf file="Z:\CSR\Tabulations\&table..rtf"  style=WCT ;
 
title '';
title1 "XYZ Inc."  j=l;
title2 "Study-203"  j=l;
title3 "Listing 16.2.8"  j=c;
title4 "Biomarker Data" j=c;
title5 "Safety Population" j=c;
 
proc report data=final1 nowd nocenter missing split = "#" style(report) = {width = 100% asis = on /*just = l*/} /*style(header) = {just = c} style(column)={just = c}*/;
    by part;
column page PART TRT01AN USUBJID SUBJID _1 AVISITN _2 ADT ADTM  _3 PARAM _4 - _7;
define page / order noprint;
define PART / order noprint;
define TRT01AN / order noprint;
define USUBJID/ order noprint;
define SUBJID / order noprint;
define _1 / group style(header)= {just=l} style(column) = {just=l cellwidth=9% asis=on};
define AVISITN / order noprint;
define _2 / group style(header)= {just=c} style(column) = {just=c cellwidth=7% asis=on};
define ADT / order noprint;
define ADTM / order noprint;
define _3 / group style(header)= {just=c} style(column) = {just=c cellwidth=5% asis=on};
define PARAM / order noprint;
define _4 / group style(header)= {just=c} style(column) = {just=c cellwidth=12% asis=on};
define _5 / style(header)= {just=c} style(column) = {just=c cellwidth=4% asis=on};
define _6 / style(header)= {just=c} style(column) = {just=c cellwidth=4% asis=on};
define _7 / style(header)= {just=c} style(column) = {just=c cellwidth=9% asis=on};
Break after part / page;
 
Compute Before part / style = {cellheight = 1.2%};
Line @1 " ";
Endcomp;
/*Compute After page / style = {cellheight = 1.2%};
Line @1 " ";
Endcomp;*/
run;
 
ods rtf close;
ods listing;

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The justification, and other options like text color, font or size, come before the text they apply to.

 

So try:

 

title1   j=l  "XYZ Inc.";

View solution in original post

1 REPLY 1
ballardw
Super User

The justification, and other options like text color, font or size, come before the text they apply to.

 

So try:

 

title1   j=l  "XYZ Inc.";

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 502 views
  • 2 likes
  • 2 in conversation