I am generating the tables using the proc report. I want to get a underline under the one of the 'Treatment' heading, I used this code " '"^R/RTF'\brdrb\brdrs' " in the column section however, it not generating the underline covering the treatments. I need an underline beneath the 'Treatment' covering all the treatments. Can you please suggest what I am doing wrong and other options to achieve it. Thanks.
This is the code I used in column section
column ("^R/RTF'\brdrb\brdrs '" sort col1 ("^R/RTF'\brdrb\brdrs' Treatment Group" trt1 trt2 trt3 trt4 ) );
This is the output it generating without 'underline' beneath the Treatment header.
Try this one:
ods rtf file='c:\temp\temp.rtf' style=journal bodytitle;
proc report data=sashelp.class nowd;
columns name age ("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2}Treatment Group" weight height);
define name/display;
run;
ods rtf close;
@SASuserlot wrote:
I am generating the tables using the proc report. I want to get a underline under the one of the 'Treatment' heading, I used this code " '"^R/RTF'\brdrb\brdrs' " in the column section however, it not generating the underline covering the treatments. I need an underline beneath the 'Treatment' covering all the treatments. Can you please suggest what I am doing wrong and other options to achieve it. Thanks.
This is the code I used in column section
column ("^R/RTF'\brdrb\brdrs '" sort col1 ("^R/RTF'\brdrb\brdrs' Treatment Group" trt1 trt2 trt3 trt4 ) );
This is the output it generating without 'underline' beneath the Treatment header.
Because of the way many options interact in Proc Report it is suggested to always include the entire procedure code, not just one line. Especially not a line that doesn't work.
You might consider creating a dummy report appearance with a word processor or other program, creating an image of that appearance and sharing that as well. I pretty sure at this time that I do not know where you want "line".
Thanks for our response. I will try to post the sample code.
Try this one:
ods rtf file='c:\temp\temp.rtf' style=journal bodytitle;
proc report data=sashelp.class nowd;
columns name age ("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2}Treatment Group" weight height);
define name/display;
run;
ods rtf close;
It worked Ksharp. Thank you very much.
Hi,
We need to assign border width for the line you need for that report
'"^R/RTF'\brdrb\brdrs\brdrw' "
that W is the width of the border ,give 3 for that "w"
'"^R/RTF'\brdrb\brdrs\brdr3' "
Now it will work.Kindly check and update your comment.
Similar to what Ksharp posted, I would consider an alternative, which might be more destination agnostic? I am presenting a macro at PHUSE US Connect 2024 in paper SM04 that covers some of this and how to get adequate spacing between multiple headers of columns headers. Consider:
`S={ borderbottomcolor = black
borderbottomwidth = 1pt
borderleftstyle = none
borderrightstyle = none
}
column page_order_1
page_1
section_order_1
row_order_1
row_1
( "`S={ borderbottomcolor = black borderbottomwidth = 1pt borderleftstyle = none borderrightstyle = none }Group 1`n(N = 10)"
col1
col2
)
null1
( "`S={ borderbottomcolor = black borderbottomwidth = 1pt borderleftstyle = none borderrightstyle = none }Group 2`n(N = 8)"
col3
col4
)
null2
( "`S={ borderbottomcolor = black borderbottomwidth = 1pt borderleftstyle = none borderrightstyle = none }All`n(N = 18)"
col5
col6
)
;
I create the null_ variable using a compute block in REPORT and given them cellwidth = 0.25%. They are missing values and have no borders. A very important point is what TEMPLATE or STYLE overrides you employ.
HTH,
Kevin
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.