I have a stored procedure.
It takes two parameters @StartDate and @EndDate. When any date range is entered, @startdate always selects the closest monday and @enddate always selects the closest sunday(some one helped me out). It works fine as I did this for weekly results. Now they want to enter any date range (like the whole month, or whole year) and to want to group the result by days of the week. The report result is like below:
Date Count
------------------------------
Monday 06/07/2004 250
Tuesday 06/08/2004 300
Wednesday 06/09/2004 350
Thursday 06/10/2004 256
Friday 06/11/2004 234
Saturday 06/12/2004 450
Sunday 06/13/2004 234
This is if they enter a small range like startdate '06/06/2004' and enddate '06/12/2004'. If they enter a wide range like '06/06/2004' and '06/30/2004' then the report displays the remaining dates as well, but I want to group it by days, like no date is needed, just;
Day Cummlative Count
-----------------------------
Monday 1,234
Tuesday 2,345
Wednesday 3,345
Thursday 2,345
Friday 5,768
Saturday 6,098
sunday 4,654
-----------------------------------
How do I do this?
Thanks,
Shal