BookmarkSubscribeRSS Feed
sarunas
Calcite | Level 5
Hello everyone,

I have faced an interesting problem – I want to append some html tags to raw data in a SAS table. The purpose of this is that I want to make values of ACROSS variable to appear in different colors in HTML output generated by proc REPORT.

Within DATA STEP I change values :
‘value1’ ą ‘value1
‘value2’ ą ‘value2
and so on.

The interesting behavior of proc REPORT is that it replaces special symbols ‘<‘ and ‘>’ with < and > in HTML output. So, instead of seeing ‘value1’ in red and value2 in blue through internet browser, I see the whole expression ‘value1’ and ‘value2’.

Is it possible to set up proc REPORT or ODS options so that it would not replace special html symbols with their appropriate html codes ?

Thank you.
2 REPLIES 2
Kathryn_SAS
SAS Employee
Try adding the following to your PROC REPORT statement:

proc report data=dsn nowd
style(column)=[protectspecialchars=off];
sarunas
Calcite | Level 5
Thank you Kathryn a lot.. it worked 🙂

with best regards,
Sarunas

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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