Hi SAS users,
I have a table (table have) with the code. I want to modify it to "table want" (black line under the first line, footnote line change, no vertical line in the middle).
How should I modify the code that I have? Thank you.
PROC REPORT DATA=ALL LIST MISSING NOWINDOWS
HEADLINE HEADSKIP SPLIT = '@' ;
WHERE NUM GE 4 ;
COLUMN (NUM SORT1 VARNM COL1 ) ;
DEFINE NUM /ORDER NOPRINT ;
DEFINE SORT1 /ORDER NOPRINT ;
DEFINE VARNM /ORDER WIDTH=20 'Parameter' LEFT
style(column)=[cellwidth=2.00in font_weight=bold ] ;
DEFINE COL1 /WIDTH=12 "Data" CENTER
style(column)=[cellwidth=2.50 in] ;
compute before NUM ;
count+1;
endcomp;
compute NUM;
if NUM ^= '' and count ^=1 then call define(_row_,'style','style=[bordertopcolor=black bordertopwidth=2]');
endcomp;
BREAK AFTER NUM / SKIP ;
compute after _page_/ style={just=left};
line "n, number; SD, standard deviation; Min, minimum; Max, maximum.";
endcomp;
RUN;
Hi:
Changing STYLE(HEADER) on the PROC REPORT statement, as shown below, worked for me. You did not explain about what ODS destination you wanted. I switched to JOURNAL style for the RTF, but left the HTMLBLUE style for HTML, since you did not clarify what destination you wanted.
I also cleaned up your code to get rid of the LISTING only options and also simplified your IF statement for the CALL DEFINE statement.
Cynthia
Hi:
You don't show your ODS statements. I don't understand what style you used to get the dotted lines as cell dividers in either of your screenshots. Also, you didn't post any data for WORK.ALL, so no one can run your code.
Your code is also inconsistent -- you use LISTING only options (HEADLINE, HEADSKIP, SKIP, WIDTH ) that would be ignored by ODS destinations and you include style overrides designed for ODS destinations without showing the destination code you used for either screen shot.
Without data, you are asking people to not only make some fake data, but to guess about what destination you want.
Cynthia
Thank you for the response. I just attached the dataset here.
Hi:
Changing STYLE(HEADER) on the PROC REPORT statement, as shown below, worked for me. You did not explain about what ODS destination you wanted. I switched to JOURNAL style for the RTF, but left the HTMLBLUE style for HTML, since you did not clarify what destination you wanted.
I also cleaned up your code to get rid of the LISTING only options and also simplified your IF statement for the CALL DEFINE statement.
Cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.