Thanks Cynthia! This pretty much worked. The weird thing is if I add in a compute block to hold the value of the logop variable and try to use it in the urlstring it still doesn't work. When I use a computed item similar to your 'showreg' example the logop both prints and appears correctly in the urlstring. So I ended up using a computed item, show_logop, with a noprint. That gets me the result I wanted! Revised code is below, in case it might help others:
proc report data = report_data_fam ( where = ( day >= TODAY() - 7 and src eq &src ) )
nowd
split = ' '
style( header ) = { background=CX5382A1
foreground=white
font_size = 3 }
style( column ) = { font_size = 3 };
column src logop show_logop platform site day,( units_tested units_failed yield ) dummy;
define src / ' ' group;
define logop / ' ' group;
define show_logop / ' ' computed noprint;
define platform / ' ' group;
define site / ' ' group;
define day / ' ' across format = MMDDYY. descending;
define units_tested / 'T' analysis;
define units_failed / 'F' analysis;
define yield / 'Y' analysis format = percent9. center;
define dummy / computed noprint;
compute site;
call define ( '_c1_', 'style', 'style=[background=CXE76F00 font_weight=bold foreground=white]' );
call define ( '_c2_', 'style', 'style=[background=CXE76F00 font_weight=bold foreground=white]' );
call define ( '_c3_', 'style', 'style=[background=CXE76F00 font_weight=bold foreground=white]' );
call define ( '_c4_', 'style', 'style=[background=CXE76F00 font_weight=bold foreground=white]' );
endcomp;
/* Store logop for constructing links. */
compute before logop;
this_logop = logop;
endcomp;
compute show_logop / character length=3;
show_logop = this_logop;
endcomp;
compute units_tested;
%if &version = dev %then %do;
urlstring = 'http://ws-uprd-01.west/~am153274/SAS/Dev/GlobalQuality/YieldMetrics/'
||trim(site)||'_'||trim(this_logop)
||'_ProductYieldData.html#'
||trim(platform);
%end;
%else %do;
urlstring = 'http://ws-uprd-01.west/~am153274/SAS/GlobalQuality/YieldMetrics/'
||trim(site)||'_'||trim(this_logop)
||'_ProductYieldData.html#'
||trim(platform);
%end;
call define ( _col_, 'url', urlstring );
endcomp;
%if &cnt eq 2 %then %do;
compute units_failed;
%if &version = dev %then %do;
urlstring = 'http://ws-uprd-01/~am153274/SAS/Dev/GlobalQuality/YieldMetrics/'
||trim(site)||'_'||trim(this_logop)
||'_HW_Fails.html#'
||trim(platform);
%end;
%else %do;
urlstring = 'http://ws-uprd-01/~am153274/SAS/GlobalQuality/YieldMetrics/'
||trim(site)||'_'||trim(this_logop)
||'_HW_Fails.html#'
||trim(platform);
%end;
call define ( _col_, 'url', urlstring );
endcomp;
%end;
compute dummy;
cnt+1;
if mod( cnt, 2 ) then
call define( _row_, 'style', 'style=[background=CXFFFFFF font_weight=bold ]' );
else
call define ( _row_, 'style', 'style=[background=CXD3D3D3 font_weight=bold ]' );
endcomp;
run;
quit;
... View more