Created
January 18, 2012 22:22
-
-
Save niczak/1636196 to your computer and use it in GitHub Desktop.
Crystal Reports - Monthtly Project Report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select e.last_name, e.first_name, e.display_employee, ld3.short_description proj_desc, ld1.ld1 account_id, ld1.short_description account_name, ld3.ld1 project, | |
sum(tso.pay) as salary, sum(tso.calc_value2) as fringe, sum(tso.calc_value4) as fringe_icr | |
from time_sheet_output tso, | |
employee_periods ep, | |
employee e, | |
ld3, | |
ld1 | |
where e.employee = ep.employee | |
and (' All' in ({?STD_DEPARTMENT_SQL}) or ld1.ld1 in ({?STD_DEPARTMENT_SQL})) | |
and tso.ld3 = ld3.ld1 | |
and tso.ld1 = ld1.ld1 | |
and tso.work_dt between ld1.eff_dt and ld1.end_eff_dt | |
and tso.work_dt between ld3.eff_dt and ld3.end_eff_dt | |
and tso.transaction_type in (30, 40) | |
and tso.employee_period_version = ep.calc_emp_period_version | |
and tso.work_dt between e.eff_dt and e.end_eff_dt | |
and tso.work_dt between {?STD_START_DATE_SQL} and {?STD_END_DATE_SQL} | |
and ({?STD_START_DATE_SQL} between ep.pp_begin and ep.pp_end | |
or {?STD_END_DATE_SQL} between ep.pp_begin and ep.pp_end | |
or ep.pp_begin between {?STD_START_DATE_SQL} and {?STD_END_DATE_SQL}) | |
group by ld1.ld1, ld1.short_description, e.last_name, e.first_name, e.display_employee, ld3.short_description, ld3.ld1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment