Hi SAS users,
I need help in bringing some colors to my Report that is being printed int he Email body. Below is my template code where i specified gray /Blue color for my header . I am not able to see any colors. It is coming as complete white. I just need color for my heading variables for Email only.
PROC TEMPLATE;
DEFINE STYLE STYLES.MYSTYLE;
PARENT=STYLES.MYSTYLE;
CLASS SYSTITLEANDFOOTERCONTAINER / HTMLSTYLE="BORDER:NONE";
class Header/
background=GRAY
foreground=BLACK;
replace Output from Container /
frame = box
rules = all
borderwidth = 1pt
bordercolor = color_list('fga1')
cellpadding = 7pt
cellspacing = 0pt;
END;
RUN;
FILENAME MYMAIL EMAIL FROM = "myemail@email.com"
TO = "myemail@email.com"
SUBJECT = "client report " CONTENT_TYPE = "TEXT/HTML";
ODS _ALL_ CLOSE;
ODS HTML BODY=MYMAIL RS=NONE STYLE=MYSTYLE;
OPTIONS NOCENTER; /*OPENING TEXT*/
PROC REPORT DATA = client_COUNTS;
COLUMNS _ALL_; DEFINE _ALL_ / DISPLAY CENTER;
title1 ' ';
title2 'client report';
title3 ' ';
RUN;
ODS _ALL_ CLOSE; ODS LISTING;
Have you tried using styles in proc report?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.