Thank you for the quick response and apologies for not including all of the applicable information. As you can probably tell, this code is a work in progress and adapted from another piece of code that was used to output RTF files, which is why the PROTECTSPECIALCHARS option was used. I have now removed that option from the code. The variables where the checkmark character needs to appear simply uses the string "~{unicode '2714'x}", where applicable. I have attached the dataset that my code references. I know it is probably not as dynamic as it could be, but I used compute blocks to assign the background color. Please see my entire updated macro below. %macro monthly; /*Create dataset for looping through practices and for obtaining contact info*/ proc sort data = out.final_report; by practice descending date_sent; run; proc sort data = out.final_report nodupkey out=practices; by practice; run; /*create number variable to count the practices*/ data praccount; retain rank; rank = _n_; set practices (keep=practice email contact); run; proc sql noprint; select count(practice) into :count from praccount; quit; %let i=1; %do %while (&i <= /*&count.*/10); data _null_; set praccount; where rank = &i.; call symput('practice',strip(practice)); call symput('contact',strip(contact)); call symput('email',strip(email)); run; ods listing close; ods noresults; ods escapechar="~"; options nodate nonumber; ods pdf file = "&cipath./RSchneider/Monthly Summary Automation Development/Output/&practice..pdf"; ods pdf text="~S={font=(Times,14pt,bold) textalign=center color=black}&Practice."; ods pdf text="~S={font=(Times,11pt,bold) textalign=center color=black}Practice Contact:"; ods pdf text="~S={font=(Times,11pt) textalign=center color=black}&contact."; ods pdf text="~S={font=(Times,11pt) textalign=center color=black}&email."; ods pdf text="~S={font=(Times,11pt,bold) textalign=center color=black}Date Report Created: &sysdate9."; proc report data = out.final_report (where=(practice = "&practice.")) style(hdr)=[foreground=&icpblue. font=("Times",11pt) background = white fontweight=bold textalign=center verticalalign=center] style(column) = [cellpadding=1pt textalign=center ]; columns (color ("Date Sent" date_sent) ("Qtr" qtr) ("CMF" cmf_Display) ("Project" Practice_initiative) ("Due Date" due_date) ("Returned" returned)); /*Define the style elements for each column*/ define color / noprint; define date_sent / display " " style = [cellwidth=1in foreground=black font=("Times",11pt) textalign=center verticalalign=middle]; define qtr / display " " style = [cellwidth=1in foreground=black font=("Times",11pt,bold) textalign=center verticalalign=middle]; define cmf_display / display " " style = [cellwidth=1in foreground=black font=("Times",11pt) textalign=center verticalalign=middle]; define practice_initiative / display " " style = [cellwidth=1in foreground=black font=("Times",11pt) textalign=center verticalalign=middle]; define due_date / display " " style = [cellwidth=1in foreground=black font=("Times",11pt) textalign=center verticalalign=middle]; define returned / display " " style = [cellwidth=1in foreground=black font=("Times",11pt) textalign=center verticalalign=middle]; compute date_sent; if color = "Green" then call define (_COL_, "style", "style=[background=&reportgreen]"); if color = "Yellow" then call define (_COL_, "style", "style=[background=&reportyellow]"); if color = "Red" then call define (_COL_, "style", "style=[background=&reportred]"); endcomp; compute qtr; if color = "Green" then call define (_COL_, "style", "style=[background=&reportgreen]"); if color = "Yellow" then call define (_COL_, "style", "style=[background=&reportyellow]"); if color = "Red" then call define (_COL_, "style", "style=[background=&reportred]"); endcomp; compute cmf_display; if color = "Green" then call define (_COL_, "style", "style=[background=&reportgreen]"); if color = "Yellow" then call define (_COL_, "style", "style=[background=&reportyellow]"); if color = "Red" then call define (_COL_, "style", "style=[background=&reportred]"); endcomp; compute practice_initiative; if color = "Green" then call define (_COL_, "style", "style=[background=&reportgreen]"); if color = "Yellow" then call define (_COL_, "style", "style=[background=&reportyellow]"); if color = "Red" then call define (_COL_, "style", "style=[background=&reportred]"); endcomp; compute due_date; if color = "Green" then call define (_COL_, "style", "style=[background=&reportgreen]"); if color = "Yellow" then call define (_COL_, "style", "style=[background=&reportyellow]"); if color = "Red" then call define (_COL_, "style", "style=[background=&reportred]"); endcomp; compute returned; if color = "Green" then call define (_COL_, "style", "style=[background=&reportgreen]"); if color = "Yellow" then call define (_COL_, "style", "style=[background=&reportyellow]"); if color = "Red" then call define (_COL_, "style", "style=[background=&reportred]"); endcomp; run; ods pdf close; %let i = %eval(&i+1); %end; %mend; %monthly
... View more