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!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 631 views
  • 0 likes
  • 2 in conversation