BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DavidPhillips2
Rhodochrosite | Level 12

Is there a way to create a blank colored line in SAS 9.2 using proc report.  The code would look something like this.

compute after location;

line ' ' style={background=lightblue}; 

endcomp;

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

Do you mean like the pink line?

pink_divider_line.png

That was done in a COMPUTE block like this, you don't need CALL DEFINE unless you wanted to highlight one of the student's rows using CALL DEFINE, as shown in this paper: http://support.sas.com/resources/papers/proceedings13/366-2013.pdf on pages 13/14 at how CALL DEFINE is used to make the entire row purple.

  compute after age / style={background=lightpink};

    line ' ';

  endcomp;

cynthia

View solution in original post

5 REPLIES 5
DavidPhillips2
Rhodochrosite | Level 12

I found this:

call define(_ROW_,'STYLE',   'style={background=cxeeeeee}');

However it looks like I need an if condition to correlate it to the blank computed line. Still looking for an example.

data_null__
Jade | Level 19

It would be helpful if you make working example proc report that does close to what you want.  A blank colored line where and when are important to the method used to make it.

You can search for CALL DEFINE to find examples.

Cynthia_sas
SAS Super FREQ

Hi:

Do you mean like the pink line?

pink_divider_line.png

That was done in a COMPUTE block like this, you don't need CALL DEFINE unless you wanted to highlight one of the student's rows using CALL DEFINE, as shown in this paper: http://support.sas.com/resources/papers/proceedings13/366-2013.pdf on pages 13/14 at how CALL DEFINE is used to make the entire row purple.

  compute after age / style={background=lightpink};

    line ' ';

  endcomp;

cynthia

DavidPhillips2
Rhodochrosite | Level 12

Cynthia,

That is exactly what I was looking for.

Cynthia_sas
SAS Super FREQ

Hi:

  Just remember to try your stored process in all the possible client applications that could use it. Some clients only use SASReport XML (like PPT and Web Report Studio) and there is no guarantee that the LINE statement and/or the style override will be honored in ALL client applications. Especially since you are using 9.2, there were some issues with the LINE statement in stored processes in earlier versions of SAS. (19950 - Errors might occur when running a stored process containing PROC REPORT code in SAS® Web Rep...)

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
  • 5 replies
  • 1025 views
  • 3 likes
  • 3 in conversation