BookmarkSubscribeRSS Feed
Eva
Quartz | Level 8 Eva
Quartz | Level 8
Hi!

in a proc report I create a new row with compute and the line statement. Now I's like to set the background color of this row. However, the call define shows no effect. Here's my code:

proc report mydata;
column mycol1 mycol2;
define mycol1 / group '';
define mycol2 / analysis sum '';

compute after mycol1;
@1 line 'my group heading';
call define(_row_,'style','style={font_weight=bold backgroud=blue}');
endcomp;
run;

Best regards
Eva
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Technically, the area created by a LINE statement is controlled by different methods than the _ROW_ method. So you have 2 ways to control the output from a LINE statement:
1) use STYLE(LINES) in a PROC REPORT statement to control the style of all the LINE statement output; or
2) add the style override to your COMPUTE statement which will ONLY impact the LINE output that is contained within that COMPUTE block:
[pre]
compute after mycol1 /
style={font_weight=bold backgroud=blue just=l};
line 'my group heading';
endcomp;
[/pre]

Note also that I removed the @1 in favor of using JUST=L. Generally speaking the use of @ pointer controls rarely results in the output you want. By using @1, I assume you wanted to left-justify your text string.

cynthia
Eva
Quartz | Level 8 Eva
Quartz | Level 8
Dear Cynthia,

thanx a lot fpr your great answer - as usual a great inspiration for accumulating knowledge 🙂

Best regards
Eva

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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