BookmarkSubscribeRSS Feed
mmea
Quartz | Level 8

Hi. 

I have this code for a proc report

And the format for a check mark symbol do not show in the output ?

options mprint;

Proc format;
value pctf
. =  ''
low-<0.1 = 'X'
0.1-high = '(*ESC*){unicode "2713"x}'
;
value colorf
. =  white
low-<0.1 = lightmoderatered
0.1-high = lightblue
;
run;
%macro many_col;
    proc sql noprint;
        select count(distinct dato) into :ncols from pdf1;
    quit;
    %put &=ncols;
	proc report data=pdf1 style(header) = {background = STEEL color = white};
	    columns region teststed dato,ventetid;
	    define Region/group style(header) = {background = STEEL color = white font_weight=bold font_face=calibri} style(column) = {background = STEEL color = white font_weight=bold font_face=calibri};
	    define teststed/group style(header) = {background = STEEL color = white font_weight=bold font_face=calibri} style(column) = {background = STEEL color = white font_face=calibri};
	    define dato/across order=internal format= ddmmyyd10. style(header) = {background = STEEL color = white font_weight=bold font_face=calibri};
	    define ventetid/sum format=pctf5.'';
	    compute ventetid;
	          %do i=1 %to &ncols;
	               call define("_c%eval(&i+2)_",'style','style={background=colorf. color=black font_face=calibri}');
	          %end;

	      endcompute;
	run;
%mend;

%many_col
1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  What is your destination of interest? RTF, PDF, HTML, EXCEL? You don't show any ODS statements, so it is only a guess that you might want PDF based on the dataset name.

  This works for me in HTML, using a simple format specification since you're using the glyph (the checkmark) and other characters for the formatted value and then a DEFINE statement style override to change the background:

Cynthia_sas_0-1608570057538.png

 

Cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 452 views
  • 0 likes
  • 2 in conversation