BookmarkSubscribeRSS Feed
LAtwood
Calcite | Level 5

I have the following code:

ods pdf file=_WEBOUT

proc report data=WORK.QUERY_FOR_APPEND_TABLE_009E_0000 nowd;

column cc unit SUM_of_schd_hrs elect_hrs mech_hrs single_day_delay

mtd_delay_perct goal MTBF MTTR;

compute single_day_delay;

if cc='506' AND single_day_delay <=7.1

then

call define ('single_day_delay', 'style', 'style=[background=green]') ;

endcomp;

Instead of using a color like green in the above code, I would like to create a pattern in the background.  For example, stripes or dots.  Reason being, not everyone has access to a color copier and I wanted the user to be able to identify cells with a pattern if printed B&W.

Any help with this would be appreciated.

2 REPLIES 2
Cynthia_sas
SAS Super FREQ


Hi, cells only have a background color and foreground color, but you can specify shades of gray as the background(cxeeeeee - very light light gray; cxcccccc - a little darker; cxaaaaaa - a little darker; cx666666 a little darker or specify as GRAYEE, GRAYCC, GRAY66, etc), which should print on a grayscale printer. I think the only way to get a "pattern" in a cell would be to put an image of the pattern you want in the cell. The issue with that, is that you only have the possibility of PREIMAGE or POSTIMAGE to place the image, which means that the cell text would be to the right or left of the "pattern" image. You might try checking out the ODS report writing interface to see whether the DATA step syntax for writing custom reports allows cell text to be imposed over an image. That would be a question for Tech Support.

  I would be tempted in PDF to use textdecoration=overline or textdecoration=underline as a style override, because if you only had 2 possibilities, the overline could represent one condition and the underline could represent another condition.

cynthia

LAtwood
Calcite | Level 5

Thank you Cynthia.  I used the three shades of gray because I have 3 conditions.  This will work.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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