Strangely after updating to 4.4.0 my reports that were working are no longer producing rows, unless I enter information in some optional parameters.
If I comment out all these case statements in the where clause, things work, or if I enter information in the all the parameters used in the case statements, then I get information:
where tl.hours is not null
and tl.day between vBeginDate and vEndDate
/*and th.officeID in (select id from freelancer_office_id_data_tmp) */
/*and tc.dtLocationID in (select id from freelancer_dt_location_id_data_tmp) */
and case when vPayPeriodBeginDate is not null
then p.payDate between vPayPeriodBeginDate and vPayPeriodEndDate
else 1 = 1
end
/*and case when vFreelancerID is not null
then tc.freelancerID = vFreelancerID
else 1 = 1
end*/
and case when vClientID is not null
then tl.clientID in (select clientID from freelancer_client_id_data_tmp)
else 1 = 1
end
and case when vProductID is not null
then tl.productID in (select productID from freelancer_product_id_data_tmp)
else 1 = 1
end
and case when vDepartmentID is not null
then tc.departmentID in (select departmentID from freelancer_department_id_data_tmp)
else 1 = 1
end
and case when vRoleID is not null
then tc.roleID in (select roleID from freelancer_role_id_data_tmp)
else 1 = 1
end
and tl.postSessionID is not null
group by tc.timesheetHeadID, tl.roleID, tl.clientID, tl.productID, tl.pirateJobNum, tc.rateType, tc.rateAmt
order by dt.id, freelancer_name, tl.clientID, d.name, th.timesheetDate;