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;
@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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.