Please follow this if I m not wrong:
1)Get sales Max and Min date(e.g. 12/12/2007, 12/12/2005)
2)Now loop through max to min on months and get distinct ones in array list (dictionary) having month, year as key and as value too except the current month.
3)Assign this array list to DDL or whatever control.
4)On selected index change(or any other event), make start and end date of value selected. For example, if u select 12,2007. then it should be 1/12/2007 - 31/12/2007.
5)Rest is soooo much easy.
IF any confusion ask freely.
Regards,
Ali Irfan
|