How do I unbold the headers in proc report using sasdocprinter. I would also like to conditionally highlight cells gray using sasdocprinter. Let's say I want the number 50 to be highlighted in the column panel. How would I do this? My escapechar is "^" but I am not sure where to place the unbolding and conditional formatting in order to work.
Thank you for all the help!
Currently I have the following:
proc report data = perm.data nowindows headline headskip missing center
style(report)=[cellspacing=2 borderwidth=2 bordercolor=black]
style(header) = { font_face = 'Times New Roman' font_size = 10pt just = center cellheight=.52in}
style(column) = {font_face = 'Times New Roman' font_size = 10pt just = center /*asis = on*/ cellheight=.2in};
column panel n min max mean median std stderr cv pvaluen ;
define panel / display /*order*//*group*/ ' / /Panel' center style=[cellwidth=12mm /*cellheight=.2in*/];
define n / display ' / /N' center style=[cellwidth=10mm /*cellheight=.2in*/];
define min / display format = 12.1 ' / Min/Response' center style=[cellwidth=18mm /*cellheight=.2in*/];
define max / display format = 12.1 ' / Max/Response' center style=[cellwidth=18mm /*cellheight=.2in*/];
define mean / display format = 12.1 ' / Mean/Response' center style=[cellwidth=18mm /*cellheight=.2in*/];
define median / display format = 12.1 ' / Median/Response' center style=[cellwidth=18mm /*cellheight=.2in*/];
define std / display format = 12.3 ' / /Std. Dev' center style=[cellwidth=16mm /*cellheight=.2in*/] flow ;
define stderr / display format = 12.3 ' / /Std. Err' center style=[cellwidth=15mm /*cellheight=.2in*/] ;
/*Don't multiply cv by 100 in SAS, it will be formatted here*/
define cv / display format = percent8.1 ' / /%CV' center style=[cellwidth=15mm /*cellheight=.2in*/];
define value/ display format = 12.3 'P-Value for/Normality/Test' center style=[cellwidth=20mm /*cellheight=.2in*/];
compute value;
if value<=0.001;
call define (_10_, "style", "style=[background=ltgray]");
endcomp;
run;
The style element Fontweight can take the following options:
FONTWEIGHT=weight
where weight is any of the following:
MEDIUM
BOLD
DEMI_BOLD
EXTRA_BOLD
LIGHT
DEMI_LIGHT
EXTRA_LIGHT
proc format; value proffmt low-<0='red' 0-high='green'; run; proc report data=sashelp.prdsale; column country predict actual diff; define country /group; define diff /'Difference' computed format=dollar12.2 style(column)=[backgroundcolor=proffmt.]; compute diff; diff = predict.sum - actual.sum; endcomp; run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.