BookmarkSubscribeRSS Feed
SASAna
Quartz | Level 8

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;

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

Have you tried using styles in proc report?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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