BookmarkSubscribeRSS Feed
RandoDando
Pyrite | Level 9

I am trying to highlight rows in a report which fit a condition (in this case Order = 1).  I fear the audience of this report will print in black and white, so I prefer to have the selected rows with dark borders all around them, to include all columns.  I tried formatting with the top and bottom borders as such, but it didn't work.  I do not want ANY breaks in the output, just dark borders around the selected cases.  If there are sequential cases which fit the condition, I still want dark borders around the individual rows.

 

compute order ;
if order = 1 then do;
     call define(_row_, 'style', 'style=[bordertopwidth=2 borderbottomwidth=2 bordertopcolor=black borderbottomcolor=black]');
     end;
endcomp;
2 REPLIES 2
RandoDando
Pyrite | Level 9
Looks like the issue may be the variable. To avoid using reserved words, I changed the variable name "order" to something else, but I am still getting the variable uninitialized error in my log. The variable is in the Columns statement and in the define statement with the noprint option since I do NOT want it in my report. Not sure why it's giving me that error.
ballardw
Super User

@RandoDando wrote:
Looks like the issue may be the variable. To avoid using reserved words, I changed the variable name "order" to something else, but I am still getting the variable uninitialized error in my log. The variable is in the Columns statement and in the define statement with the noprint option since I do NOT want it in my report. Not sure why it's giving me that error.

1) Please include some example data that duplicates the behavior, especially if it may be a data value issue.

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.

 

2) Please include the entire Proc Report code using that data.

 

You can reduce the data to fewer variables and the corresponding code as well so we can focus on the issue. But the code must behave the same with the provided data.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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