posted 19 years ago
I have the following data and i have three buttons(yearly,monthly and weekly)
The table(tab1) having two columns(col1 date values and col2 number values) .
Col1 col2
---------------------- ------------------------------
12-mar-04 10
23-may-05 6
10-apr-04 9
15-mar-04 5
20-mar-04 5
THIS IS FOR YEARLY QUERY:
whenever user select the particular date (ex:10-mar-04) and click the year button, the output like the following :
the user selected that particular date ,if that date having data then we have to display that data, otherwise we have to display zero only.
if more than one time exists that date then we have to display that sum of data.so everytime we have to display 12 rows for this year button.
Date sum
------------------ ----------------------------
jan 04 0
feb 04 0
mar 04 20(=10+5+5)
apr 04 9
may 04 0
jun 04 0
jul 04 0
-- --
-- --
-- --
dec 04 0
THIS IS FOR MONTHLY QUERY:
For aboue date(10-mar-04):
Whenever user click the month button ,the output like the following :
here we have to display weekly wise data(ie how much data is there entire week) for this monthly button.first we have to display first date of that month and next we have to display next sunday date and then next we have to display next sunday, etc
Date Sum
-------------------- -----------------------------------
01-mar-04 0
07-mar-04 10
14-mar-04 10(5+5)
21-mar-04 0
28-mar-04 0
THIS IS FOR WEEKLY:
for aboue date(10-mar-04):
whenever user click weekly button,the output like the following:
here we have to display the particular week days only,that means
only sunday to saturday(if exists that dates), otherewise how many week days are exists of that date that dates only we have to display.
so for this button we will display minimum 1 row and maximum 7 rows.
Date Sum
---------------------- -----------------------------
07-mar-04 0
08-mar-04 0
09-mar-04 0
10-mar-04 0
11-mar-04 0
12-mar-04 10
13-mar-04 0
if any one got this queries then immediately send me.
[ November 07, 2005: Message edited by: rama subba reddy ]