BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have the following proc report code:

columns LVL_2 inj_yr, (lost1 avg_emp rate1);
define LVL_2 / group 'Departments;
define inj_yr / across '' ;
define rate1 / analysis 'Rate' width=5;
define avg_emp / analysis 'Avg Emp';
define lost1 / analysis noprint;
compute rate1;
if _c4_>&hi05 then call define ('_c4_',"style","style=[foreground=red]");
attrib='style={flyover="Lost: _c2_"}';
call define('_c4_','style',attrib);
endcomp;

How do I reference the column _c2_? The flyover text works fine, but I'm not sure how to show the actual values for _c2_.
Also, I lose foreground=red when I apply the flyover text. Is it possible to have both the flyover text and foreground=red?
Thanks,
Jason
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
This seems like a PROC REPORT question and not a SAS/GRAPH or ODS GRAPHICS question. The ODS and Base Reporting forum is explicity targeted to PROC REPORT, PROC TABULATE and PROC PRINT as well as general ODS questioins.

It is more likely that someone on that forum will have an answer for you. You should also include in your question which version of SAS you are using (9.1.3 or 9.2), as that might make a difference to the answer about the red and the flyover.

In your current assignment statement for the temporary variable ATTRIB, you are treating _C2_ as a character string. In order for the VALUE of _C2_ to be used in your text, you will want to use _C2_ in a concatenate operation when you set the value of ATTRIB.

cynthia

cynthia

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
  • 1 reply
  • 956 views
  • 0 likes
  • 2 in conversation