the Requirements is to display a person's attendance by year,quarter,month wise.
input for Stored procedure are:
StartDate (For Eg: 05/13/2006)
EndDate (For Eg: 11/04/2008).
here i want to create Year wise Group Section.
please help me to solve this Requirement.
if person has joined on 1/4/2006 and not yet terminated(or left) then we need to consider current date as terminated date.
then report should look like:
2006 |
|
|
|
98.76% |
|
Q1 |
|
|
95.07% |
|
|
|
Jan |
87.09 |
|
|
|
Feb |
100.00% |
|
|
|
Mar |
100.00% |
|
Q2 |
|
|
100.00% |
|
|
|
Apr |
100.00% |
|
|
|
May |
100.00% |
|
|
|
Jun |
100.00% |
|
Q3 |
|
|
100.00% |
|
|
|
Jul |
100.00% |
|
|
|
Aug |
100.00% |
|
|
|
Sep |
100.00% |
|
Q4 |
|
|
100.00% |
|
|
|
Oct |
100.00% |
|
|
|
Nov |
100.00% |
|
|
|
Dec |
100.00% |
|
|
|
|
|
2007 |
|
|
|
100.00% |
|
Q1 |
|
|
100.00% |
|
|
|
Jan |
100.00% |
|
|
|
Feb |
100.00% |
|
|
|
Mar |
100.00% |
|
Q2 |
|
|
100.00% |
|
|
|
Apr |
100.00% |
|
|
|
May |
100.00% |
|
|
|
Jun |
100.00% |
|
Q3 |
|
|
100.00% |
|
|
|
Jul |
100.00% |
|
|
|
Aug |
100.00% |
|
|
|
Sep |
100.00% |
|
Q4 |
|
|
100.00% |
|
|
|
Oct |
100.00% |
|
|
|
Nov |
100.00% |
|
|
|
Dec |
100.00% |
|
|
|
|
|
2008 |
|
|
|
73.75% |
|
Q1 |
|
|
100.00% |
|
|
|
Jan |
100.00% |
|
|
|
Feb |
100.00% |
|
|
|
Mar |
100.00% |
|
Q2 |
|
|
100.00% |
|
|
|
Apr |
100.00% |
|
|
|
May |
100.00% |
|
|
|
Jun |
100.00% |
|
Q3 |
|
|
95.00% |
|
|
|
Jul |
100.00% |
|
|
|
Aug |
100.00% |
|
|
|
Sep |
10.00% |
|
Q4 |
|
|
0.00% |
|
|
|
Oct |
0.00% |
|
|
|
Nov |
0.00% |
|
|
|
Dec |
0.00% |
please help me to group by parameter fields.
note: difference between startdate and enddate may contain 1 year or more that 1 year gap.
Edited by pat_sid - 05 Sep 2008 at 3:39am