Hi: But the issue the OP is having is irrelevant to whether a stored process is involved or not. The fact is that when SAS and PROC REPORT make a report from GROUP items, the first row of the group contains a value and the second and subsequent rows of the group have blanks on the rows for that column. You can prove this to yourself by running a program similar to the one below. Note that I removed the call to the stored process server with the URLSTRING variable. There's no point in calling a stored process until the "CALC" items correctly build the string you want to build. So, if you look at the "CALC" items in the attached screen shot, produced with the attached program, you will see that the LEVEL1 (and LEVEL2) value is only available on the first row of the group.), is to "grab" the group items by testing for the "before" break point and then "grabbing" and holding the value in a temporary report variable. PROC REPORT does NOT have a Program Data Vector like the DATA step. So, just because you have a LEVEL1 and LEVEL2 value on every row in the data, does not mean that the value is available to PROC REPORT as it builds each report row. A group item in a PROC REPORT table has blanks for rows where the group items would be a duplicate value -- this is considered presentation quality -- to suppress the repetitious display of duplicate values. So showing a PROC PRINT of the data doesn't mean anything because PROC REPORT builds every report row a certain way and part of that method is to suppress the repetitious display of duplicate values for GROUP and ORDER items. I used 3 separate compute blocks instead of a more complex single compute block to show the behavior that the OP observed. Until the OP has the compute blocks working correctly, there is no point in working on URLSTRING and/or building a URL to call a stored process. This is all PROC REPORT "internals" and basic PROC REPORT processing. ACROSS variables does complicate things a bit, but there's a way around that -- the key to understanding is to get around the blank values for GROUP items whe there's more than 1 value in the report rows. cynthia data test; length level1 level2 level3 $2 across1 $4; do level1 = 'A1', 'A2'; do level2 = 'B1', 'B2'; do level3 = 'C1', 'C2', 'C3'; do across1 = 'SET1', 'SET2', 'SET3'; ** output multiple obs based on RANUNI value; if ranuni(0) gt .4 then output; if ranuni(0) le .333 then output; if ranuni(0) gt .7235 then output; if ranuni(0) le .2111 then output; output; output; end; end; end; end; run; ods listing close; ods html file='c:\temp\use_grp_val.html' style=sasweb; proc report data = test nowd spanrows; title '1) Show compute without "grabbing" values'; columns level1 level2 level3 across1 (n) calc1 calc2 calc3; define level1 / group; define level2 / group; define level3 / group; define across1 / across; define calc1 / computed f=$50.; define calc2 / computed f=$50.; define calc3 / computed f=$50.; compute calc1 / character length=50; calc1 = level1||level2||level3||"SET1"; endcomp; compute calc2 / character length=50; calc2 = level1||level2||level3||"SET2"; endcomp; compute calc3 / character length=50; calc3 = level1||level2||level3||"SET3"; endcomp; run; ods html close; cynthia
... View more