BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lbarwick
Quartz | Level 8

I have an HTML report with a column reporting data as XX (XXX) in a single cell, where XX represents one subset of my raw data set and (XXX) represents another subset. I am outputting this way to conserve space since it is a fairly large report. If possible I'd like XX to be one font color and (XXX) to be another to distinguish the two values a little better. Is it possible to do this via a compute/call define statement? I couldn't find anything in the documentation and my hunch says no, in which case I will separate the values into their own columns and control the font color that way.

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Use odsescapahcar, and embed style elements in your data as:

data want;
  a="^s={color=red}34 (^s={color=blue}64)";
run;
ods escapechar="^";
proc report...;

You can set any attributes inline then - search keyword is inline formatting.

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Use odsescapahcar, and embed style elements in your data as:

data want;
  a="^s={color=red}34 (^s={color=blue}64)";
run;
ods escapechar="^";
proc report...;

You can set any attributes inline then - search keyword is inline formatting.

lbarwick
Quartz | Level 8

Ah, didn't consider inline formatting. Worked perfectly, thanks!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2 replies
  • 1072 views
  • 0 likes
  • 2 in conversation