Re: GROUP SUM with WHERE in REPORT
Posted in 1996
John Prideaux wrote: > > for i = 1 to num_years > let curr_year = year_array[i] > let rpt.sub_line_year = curr_year > let turn_rec.begin_tons = (group sum(rpt.begin_tons) > where (rpt.data_year = curr_year)) > .... > end for I ran into this too. Seems like you can't use variables (curr_year) in the where clause of a [group or other] sum in a report. I think I do remember every iteration of the loop acting as if it were the first in what the sum returned. I didn't think to report it as a bug though because I had 'for i=1 to 6' so I ended up hard coding every iteration. If theres not too many num_years in the above code it might not be too bad to do the same. -- Sincerly, Doug Wilson(dougw@amgen.com) *** The opinions expressed here are my own and not neccessarily *** *** that of a rational human being . . . ************* *** Disclaimer: These are the opinions of the poster not Amgen Inc.***