BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SAS1117106
Calcite | Level 5

HI All,

 

I am trying to get rid of the extra borders that i am getting at the places highlighted in snapshot. But I am unable to do so. It would be of great help to have your suggestions.

Current Output:

SAS1117106_1-1625058501491.png

 

Desired Output:

SAS1117106_3-1625058777402.png

 

 

Code that I am using is as below:
ods html file="&__snapshot/xx/xx/xx/&tflname..html" ;

proc report data=final split='*' spanrows
style(report)={rules=none frame=void bordercolor=black Color=black fontfamily = "Times Roman"}
style(header)={font_size=10pt rules=cols frame=void bordercolor=black Color=black fontfamily = "Times Roman" background=lightgrey}
style(report)=tableheadercontainer{frame=void }
style(column)={fontfamily = "Times Roman" font_size=10pt color=black rules=none frame=void};
column paramcd_ trt
("^S={rules=all frame=box bordertopwidth=0pt borderrightwidth=1pt borderleftwidth=1pt borderbottomwidth=0pt }HbA1c, LSM (SE)" _1004 _1015 CHG)
COL4;

define paramcd_/ order order=data noprint;
define TRT / "Treatment Group" style(header)={rules=all frame=box bordertopwidth=0pt borderrightwidth=1pt borderleftwidth=0pt borderbottomwidth=1pt
borderrightcolor=black borderleftcolor=white borderbottomcolor=black cellwidth=200 just=l}
style(column)=[rules=all frame=box bordercolor=black cellwidth=200 just=l];
define _1004 / "Baseline" style(header)={rules=all frame=box borderbottomwidth=1pt bordertopwidth=1pt borderrightwidth=1pt
borderbottomcolor=black bordertopcolor=black borderrightcolor=black cellwidth=150 asis=on just=c} center
style(column)=[rules=all frame=box bordercolor=black cellwidth=150];
define _1015 / "Week 26" style(header)={rules=all frame=box borderbottomwidth=1pt bordertopwidth=1pt borderrightwidth=1pt
borderbottomcolor=black bordertopcolor=black borderrightcolor=black cellwidth=150 asis=on just=c} center
style(column)=[rules=all frame=box bordercolor=black cellwidth=150];
define chg / "Change from*Baseline*at Week 26" style(header)={rules=all frame=box borderbottomwidth=1pt bordertopwidth=1pt borderrightwidth=1pt
borderbottomcolor=black bordertopcolor=black borderrightcolor=black cellwidth=150 asis=on just=c} center
style(column)=[rules=all frame=box bordercolor=black cellwidth=150];
define col4 / order "LSM Diff at Week 26*A: xxx versus xxx (95% CI), p-value *B: xxx versus xxx (95% CI), p-value* C: xxxx versus xx (95% CI), p-value"
style(header)={rules=none frame=void asis=on bordertopwidth=0pt borderrightwidth=0pt borderbottomwidth=1pt
borderbottomcolor=black}
style(column)={rules=all frame=hsides asis=on just=c borderbottomstyle=single cellwidth=200 borderbottomcolor=black borderbottomwidth=1pt bordertopwidth=0pt borderrightwidth=0pt borderleftwidth=0pt} ;

compute before paramcd_/style=[font_weight=bold font_size=10pt color=black fontfamily = "Times Roman"
rules=all frame=box bordercolor=black borderrightwidth=0pt bordertopwidth=1pt ];
line @1 paramcd_ $200.;
endcomp;

compute before _page_/style=[font_weight=bold font_size=10pt color=black fontfamily = "Times Roman" rules=all frame=box
borderbottomwidth=1pt bordertopwidth=0pt borderrightwidth=0pt borderleftwidth=0pt borderbottomcolor=black];
line @1 "Table XXXX.11.4. Summary and Analysis of HbA1c at Baseline and Week 26";
line @30 "All Randomized Patients";
line @30 "xxxxx";
line @1 " ";
line @1 " ";
endcomp;

compute after _page_/style=[asis=on font_size=10pt color=black fontfamily = "Times Roman" rules=none frame=void];
line @1 " ";
line @1 " ";
line @1 "Abbreviations: CI = confidence interval; HbA1c = hemoglobin A1c; LSM = least-squares mean; n = number of patients; SE = standard error.";
line @1 "^{super a} MMRM model for post-baseline measures: Variable = Baseline + Pooled Country + Type of xxx xxx at Randomization + Age Group 1 + Treatment + Time + Treatment*Time (Type III sum of squares).";
line @1 "^{super b} Baseline multiple imputation model for endpoint measures: Variable = Baseline + Pooled Country + Type of xx xx at Randomization + Age Group 1 + Treatment (Type III sum of squares).";
line @1 "Sources: /xxx/&env/xx/xxxxxx/xx/xx/xx/xxxx.rtf; xxxx.rtf.";
endcomp;

run;
ods html close;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Quite often when you do something with left/right/top/bottom border you need to also address the same style item for the bordering cell. If you set borderbottomwidth=0 for a cell then you should try setting bordertopwidth=0 for the cell that appears below.

 

Note that if you have the same item such as style(report)  more than once it is extremely likely that only the last one written gets applied.

 

No data and too hard to read the code to tell if your specific cell style overrides in the Define statements are conflicting or interacting anywhere.

View solution in original post

1 REPLY 1
ballardw
Super User

Quite often when you do something with left/right/top/bottom border you need to also address the same style item for the bordering cell. If you set borderbottomwidth=0 for a cell then you should try setting bordertopwidth=0 for the cell that appears below.

 

Note that if you have the same item such as style(report)  more than once it is extremely likely that only the last one written gets applied.

 

No data and too hard to read the code to tell if your specific cell style overrides in the Define statements are conflicting or interacting anywhere.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 312 views
  • 1 like
  • 2 in conversation