Hi:
Actually, it would help to see ALL your PROC REPORT code, not just snippets. This is an instance where knowing what your COLUMN statement and which variables are COMPUTED and which are under the ACROSS variable would help.
However, your ACROSS item (FYEAR) is not available to you in the way you want. Consider this program and output:
[pre]
proc report data=sashelp.prdsale nowd
out=repout;
title 'Across Report';
column division product year,(actual predict);
define division / group;
define product / group;
define year / across;
define actual / sum;
define predict / sum;
run;
options nodate nonumber nocenter;
proc print data=repout;
title 'What PROC REPORT does with ACROSS columns';
run;
[/pre]
"Regular" PROC REPORT output:
[pre]
Year
1993 1994
Predicted Predicted
Division Product Actual Sales Sales Actual Sales Sales
CONSUMER BED $36,637.00 $32,353.00 $37,063.00 $37,838.00
CHAIR $34,311.00 $33,771.00 $35,703.00 $32,627.00
DESK $37,346.00 $35,222.00 $36,926.00 $40,592.00
SOFA $39,505.00 $38,809.00 $35,574.00 $34,811.00
TABLE $35,958.00 $37,638.00 $33,462.00 $33,924.00
EDUCATION BED $32,826.00 $38,570.00 $35,511.00 $29,106.00
CHAIR $38,709.00 $35,727.00 $39,557.00 $33,985.00
DESK $38,821.00 $33,605.00 $36,139.00 $36,776.00
SOFA $39,927.00 $37,669.00 $33,582.00 $29,162.00
TABLE $35,437.00 $36,847.00 $37,343.00 $37,263.00
[/pre]
PROC PRINT of output dataset
[pre]
What PROC REPORT does with ACROSS columns
Obs DIVISION PRODUCT _C3_ _C4_ _C5_ _C6_ _BREAK_
1 CONSUMER BED $36,637.00 $32,353.00 $37,063.00 $37,838.00
2 CONSUMER CHAIR $34,311.00 $33,771.00 $35,703.00 $32,627.00
3 CONSUMER DESK $37,346.00 $35,222.00 $36,926.00 $40,592.00
4 CONSUMER SOFA $39,505.00 $38,809.00 $35,574.00 $34,811.00
5 CONSUMER TABLE $35,958.00 $37,638.00 $33,462.00 $33,924.00
6 EDUCATION BED $32,826.00 $38,570.00 $35,511.00 $29,106.00
7 EDUCATION CHAIR $38,709.00 $35,727.00 $39,557.00 $33,985.00
8 EDUCATION DESK $38,821.00 $33,605.00 $36,139.00 $36,776.00
9 EDUCATION SOFA $39,927.00 $37,669.00 $33,582.00 $29,162.00
10 EDUCATION TABLE $35,437.00 $36,847.00 $37,343.00 $37,263.00
[/pre]
You can see how PROC REPORT deals with ACROSS variable items. It gives each ACROSS item an ABSOLUTE column name. So for example _c3_ is the ACTUAL value for 1993 and _c4_ is the PREDICT value for 1993. Similarly, _c5_ is the ACTUAL value for 1994 and _c6_ is the PREDICT value for 1994.
So, if you want to USE 1993 or 1994 in your code, then you do not have visibility of the value for YEAR anymore. You only know what the absolute column numbers are for each year. So you could do something like this:
[pre]
compute rowr_cnr;
href1993=cats("www.testurl.com?camp=", holdcamp, "?fy=", '1993', "?comp=", commcode);
href1994=cats("www.testurl.com?camp=", holdcamp, "?fy=", '1994', "?comp=", commcode);
call define('_c3_, "URLBP", href1993);
call define('_c5_, "URLBP", href1994);
endcomp;
[/pre]
Without seeing your full code, it's impossible to do more than hint at what you can do. I've seen some folks deal with needing a value for dynamic creation by "massaging" the data ahead of time or "flattening" the data and then building the URL dynamically.
cynthia