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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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