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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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