Hey all,
I've got a gridview which is working absolutely perfect when each row resembles a record in my database which shows customer total sale values for that one year. So for example they filter with a dropdownbox and select "2012" and then they'll see a gridview with all the customers and their total sale value for 2012. This works really fast, but a second type of filter has to be available and that's one which allows them to select a scope of years, so for example 2007 till 2012. Now another gridview should become visible and again show the customers, but this time with a total sale value which is the sum of the sale values of the years 2007, 8, 9, 10, 11 and 12. This takes quite a while, but I'm sure this can be done in a faster way, but I'm not sure how.
The way I do it now is like this, which is fetching all the distinct customers and then recalculate the yeartotal so that it is the sum of the yeartotals of the past 5 years:
Go to the complete details ...