BookmarkSubscribeRSS Feed
Dob4Die
Calcite | Level 5

Continuation to this Discussion : .

I have ran the code provided cynthia (Find code below) on windows SAS 9.3 and on Enterprise guide with SAS 9.4 . On both , it worked perfectly.

Same code ran on SAS GRID (Linux) environment , the color coding from PROC FORMAT not working. If I hard code color value  in style statement  (Style(header) = { background = RED font_size= 10pt}; its working fine .  For some reason on Linux environment PROC FORMAT values not working in this statement (Style(header) = { background = $color. font_size= 10pt};.

Couldn't find any documentation about it online ?

Thanks much in advance.

proc format;

     value $color

          'REPORT' = '#9999FF'

          'Australia' = '#FF6600'

          'States' = 'pink'

          'Wombat' = 'lightgreen'

          other = 'lightblue';

     value $altclr

          'REPORT' = '#9999FF'

          'Australia' = '#FF6600'

          'States', 'Height', 'Weight' = 'pink'

          'Wombat', 'Name', 'Age', 'Sex' = 'lightgreen'

          other = 'lightblue';

run;

  

ods listing close;

ods tagsets.excelxp file = 'c:\temp\report.xml'

    options ( embedded_titles='yes') style = sansprinter;

 

proc report data = sashelp.class(obs=3) nowd

   style(header) = { background = $color. font_size= 10pt};

   title 'All Headers Different Colors Based on Formats';

   column ('REPORT'('Australia' ('Wombat' name age sex )('States' height weight)));

run;

    

proc report data = sashelp.class(obs=3) nowd

   style(header) = { background = $altclr. font_size= 10pt};

   title 'Some Headers Same Colors Based on Formats (one header diff)';

   column ('REPORT'('Australia' ('Wombat' name age sex )('States' height weight)));

   define name / 'Name';

   define age / 'Age';

   define sex / 'Sex';

   define height / 'Height';

   define weight / 'Weight'  style(header)={background=lightyellow};

run;

ods _all_ close;




2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

If it doesn't work in Grid, but does work elsewhere, then that is a question for Tech Support.

cynthia.

Dob4Die
Calcite | Level 5

Thanks Cynthia , Will work with SAS technical support.

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