Hi:
This is not directly possible unless you use a SAS Macro Program. Your other alternative is to use BY group processing in PROC REPORT and then to use #BYVAR/#BYVAL in the Title statement for Proc Report -- I know this isn't in the spanning header -- but it may be close to what you want. There's an example of a small SAS macro program with variable information in the spanning header program below. The PROC REPORT isn't very complicated...but it does show overridding the value of a header. You could make the macro logic as complicated as it needed to be.
cynthia
[pre]
%macro myhdr(reg=, prod=, hdtxt= );
%if ® = Asia %then %let hdtxt = Something Else;
proc report data=sashelp.shoes(obs=20) nowd;
where Region = "®" and product = "∏";
column region ("&hdtxt" region product sales );
run;
%mend myhdr;
ods listing close;
ods html file='c:\temp\myhdr.html' style=sasweb;
%myhdr(reg=Africa, prod=Sandal, hdtxt=African Sandals);
%myhdr(reg=Asia, prod=Boot, hdtxt=Asian Boots);
%myhdr(reg=Canada, prod=Slipper, hdtxt=Canadian Slippers);
ods html close;
[/pre]