Hi Web2py user

I want to create report on Employee.I have three tables holiday list, login 
details and  employe leave. I want to create report in such way so i can 
see employe name, total number of day in current month, total no of 
present, total number of holiday i current month and total number of leave 
emps have taken(vacation leave, medical and casual leave.

can any one help me in this  

Model
db.define_table('holiday_list',
Field('holiday_date','date',requires=IS_NOT_EMPTY(error_message='Please 
enter the Holiday date')),
Field('holiday_name',requires=IS_NOT_EMPTY(error_message='Please enter the 
Holiday Name')),
Field('remarks','text'))
 db.define_table('employee_login_detail',
Field('employee_code'),
Field('employee_email'),
Field('employee_name'),
Field('employee_login_date','date'),
Field('employee_login_time'),
Field('ip_address'))
 db.define_table('employee_leave',
Field('employee_code'),
Field('email'),
Field('taken_vacation_leave','integer'),
Field('taken_medical_leave','integer'),
Field('taken_casual_leave','integer'),
Field('left_vacation_leave','integer'),
Field('left_medical_leave','integer'),
Field('left_casual_leave','integer'))
 controller part
def admin_newholiday():
db.holiday_list.id.readable=False
form=SQLFORM.grid(db.holiday_list, selectable = lambda ids: del_hlist(ids))
return dict(form=form)
def admin_attendance():
db.employee_login_detail.id.readable=False
form=SQLFORM.grid(db.employee_login_detail, selectable = lambda ids: 
del_att(ids))
return dict(form=form)
def employee_leave():
db.employee_leave.id.readable=False
grid = SQLFORM.grid(db.employee_leave, csv=False, deletable=False, 
editable=False, searchable=True, 
showbuttontext=False,create=False,paginate=15)
 return dict(form=grid)

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to