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

Hello:

 

I'm looking for a way to control the borders in an RTF output. Currently the spanned columns underline extends the width of the table. I'd like that to only cross the data columns (see attached).

 

Code below:


/** RTF **/
ods listing close;
ods rtf file="test1.rtf" style=basic;

 

%macro prpt;

proc report data=final split="~" nowindows missing 
 style(report)={outputwidth=100% just=left}
 style(header)={asis=on bordertopwidth=0.24pt bordertopcolor=black font_weight=bold}
 ;

 columns pageno paramn_new trt01an linlabel
      ("Worst Postbaseline Toxicity Grade^{super a}" value0 value1 value2 value3 value4 value5);

 define pageno     / order order=internal noprint;
 define paramn_new / order order=internal noprint;
 define trt01an    / order order=internal noprint;

 define linlabel / " "       style(column)={cellwidth=2.6in just=l};
 define value0   / "Grade 0" style(column)={cellwidth=1.0in just=c} style(header)={just=c font_weight=bold};
 define value1   / "Grade 1" style(column)={cellwidth=1.0in just=c} style(header)={just=c font_weight=bold};
 define value2   / "Grade 2" style(column)={cellwidth=1.0in just=c} style(header)={just=c font_weight=bold};
 define value3   / "Grade 3" style(column)={cellwidth=1.0in just=c} style(header)={just=c font_weight=bold};
 define value4   / "Grade 4" style(column)={cellwidth=1.0in just=c} style(header)={just=c font_weight=bold};
 define value5   / "Missing" style(column)={cellwidth=1.0in just=c} style(header)={just=c font_weight=bold};
                                    
 break after pageno / page ;

 %if (&nobs eq 0) %then %do;
 compute after paramn_new;
  line @2 'No Lab data. ';
 endcomp;
    %end;
 %else %do;
 compute after paramn_new;
  line @2 ' ';
 endcomp;

 compute linlabel;
     if (indexw(linlabel,'m')=1) then do;
   linlabel=substr(linlabel,3,length(linlabel));
         call define(_col_, "style", "style=[leftmargin=25]");
    call define('_c1_',"style","style=[background=red]");
  end;
 endcomp;
    %end;

run;
%mend prpt;
%prpt;

 

ods rtf close;
ods listing;

1 ACCEPTED SOLUTION

Accepted Solutions
RS-1
Calcite | Level 5

Indeed. Fortunately I figured out a solution. Force a blank header for column 1 and set the bottom border to white, which effectively hides it.

 

      columns pageno paramn_new trt01an

            ('^S={borderbottomcolor=white}' linlabel)

            ("Worst Postbaseline Toxicity Grade^{super a}" value0 value1 value2 value3 value4 value5);

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
Without data, no one can run your code without spending the time to figure out the structure of your WORK.FINAL data set. And since you have so many NOPRINT items, it's hard to figure out how you created them to even attempt to make fake data.
Cynthia
RS-1
Calcite | Level 5

Indeed. Fortunately I figured out a solution. Force a blank header for column 1 and set the bottom border to white, which effectively hides it.

 

      columns pageno paramn_new trt01an

            ('^S={borderbottomcolor=white}' linlabel)

            ("Worst Postbaseline Toxicity Grade^{super a}" value0 value1 value2 value3 value4 value5);

derekmor54
Obsidian | Level 7
There is another solution. You can remove the border by using the BORDERBOTTOMSTYLE=HIDDEN. It's a small difference between setting the border to the background color, and hiding the border, but the HIDDEN value of the BORDER()STYLE attribute can remove borders in individual cells without blotting out the gridlines at the junction of your cells.

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!

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
  • 3 replies
  • 4678 views
  • 0 likes
  • 3 in conversation