BookmarkSubscribeRSS Feed
nirali514
Obsidian | Level 7

Hi! I'd like to have my last two colums have gray borders. Currently they are showing up white//no borders. Any ideas??

 

Here's my code:

 

proc format ;

value pback

low - <0.05= 'ltgray'

50 = 'ltgray'

other = 'white';

value mypval

low - <0.001 = '<0.001'

other = [best5.];

value pfront

50 = 'ltgray'

other = 'black';

run;

 

 

proc report data = perm.normalNT2 nowindows headline headskip missing center

style(report)=[cellspacing=2 borderwidth=2 bordercolor=black]

style(header) = {font_weight = light font_face = 'Times New Roman' font_size = 9pt just = center cellheight=.65in}

style(column) = {font_face = 'Times New Roman' font_size = 9pt just = center /*asis = on*/ cellheight=.22in};

column x y z;

define x / display format = mypval. 'P-Value/for/Normality/Test' center style=[cellwidth=16mm /*cellheight=.2in*/] style(column)=[background=pback.] ;

define y / display format = mypval. 'P-Value/for/Equality/of Means' center style=[cellwidth=15mm /*cellheight=.2in*/] style(column)=[background=pback. foreground =pfront. ] ;

define z / display format = mypval. 'P-Value/for/Equality of/Variances' center style=[cellwidth=17mm /*cellheight=.2in*/] style(column)=[background=pback. foreground =pfront.] ;

 

run;

ods rtf close;

1 REPLY 1
ballardw
Super User

I'm not going to look at DOCX files from an unknown source.

 

The STYLE section in the define blocks will allow you to set border colors start with bordercolor=gray for the desired columns. You can have separate colors for top, bottom, right and left as well.

 

Your current border definition is coming from you active ODS style.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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