I’ve added a join to the query in the Labor Edit report to get the actual labor hours from LaborDtl. Actually, on the subreport, EmpDetails.rdl.
LaborDtl on the RDD has two relationships for filtering and aren’t set to Output, and I tried adding a second instance of the LaborDtl table, which resulted in a “server error.” So I’m referring directly to Erp.LaborDtl in the code. But I’m doing something wrong and can’t see it.
The forms upload okay from Report Style, but when I try to preview, I get the dreaded “Error: Subreport could not be shown” message where the subreport output should be.
Care to take a look?
Thanks,
Joe
="SELECT T1.EmployeeNum,T1.DspClockInTime,T1.DspClockOutTime,T1.LaborHedSeq,T1.PayHours,T1.PayrollDate,T1.Calc_LunchIn,T1.Calc_LunchOut,LaborHours.Calculated_LaborHours as [Calc_LaborHours]
FROM LaborHed_" + Parameters!TableGuid.Value + " T1
left outer join (select
T2.Company as [LaborDtl_Company],
T2.EmployeeNum as [LaborDtl_EmployeeNum],
T2.LaborHedSeq as [LaborDtl_LaborHedSeq],
T2.LaborDtlSeq as [LaborDtl_LaborDtlSeq],
T2.PayrollDate as [LaborDtl_PayrollDate],
(sum(T2.LaborHrs)) as [Calculated_LaborHours]
from Erp.LaborDtl T2
group by T2.Company,
T2.EmployeeNum,
T2.LaborHedSeq,
T2.LaborDtlSeq,
T2.PayrollDate) as LaborHours on
T1.Company = LaborHours.LaborDtl_Company
and T1.EmployeeNum = LaborHours.LaborDtl_EmployeeNum
and T1.LaborHedSeq = LaborHours.LaborDtl_LaborHedSeq
and T1.PayrollDate = LaborHours.LaborDtl_PayrollDate
"
My intention was to set T2 to Erp.LaborDtl here: from Erp.LaborDtl T2
I’ve also used: from Erp.LaborDtl as T2
And I’m editing the RDL on my local PC on a public cloud installation. I don’t think I have a way to preview the subreport, unless you know one, I hope.
Since you are editing a standard report and adding small changes, you should be able to edit the report on a standard Epicor install and test the SSRS in your own environment (with your own SQL).