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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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