Hi Everyone,
I'm stuck in a situation where i want to show current and previous position at the same table to present history of the employee positions in SSRS Report. but i could not able to show the previous position. its only show the current position.
my code is :
while select * from hcmPositionWorkerAssignment
join hcmjobdetail
join hcmjob
join hcmPositionDetail
join hcmPositionType
where hcmjobdetail.Job == hcmjob.RecId
&& hcmjob.RecId == hcmPositionDetail.Job &&
hcmPositionDetail.PositionType == hcmPositionType.RecId
&& hcmPositionDetail.Position == hcmPositionWorkerAssignment.Position
&& hcmPositionWorkerAssignment.Worker == hcmWorker.RecId
{
EmployeeOrganizationHistoryTmp.PositionDescription = hcmPositionDetail.Description;
EmployeeOrganizationHistoryTmp.PosStart = hcmPositionWorkerAssignment.ValidFrom;
EmployeeOrganizationHistoryTmp.PosEnd = hcmPositionWorkerAssignment.ValidTo;
EmployeeOrganizationHistoryTmp.Grade = HcmCompensationLevel::find(jobdetail.CompensationLevel).CompensationLevelId;
EmployeeOrganizationHistoryTmp.JobFunction = hcmPositionType.TypeId;
EmployeeOrganizationHistoryTmp.insert();
}
i want to show both of these positions like screenshot 1. but my report shows only single record which is current see screenshot 2


and i also try this condition as well. but failed to present history.
hcmPositionWorkerAssignment.ValidTo >= DateTimeUtil::utcNow().
*This post is locked for comments
I have the same question (0)