Jim,
That is not what I would have expected from a normalized table structure. I typically have just a ReportsTo field. In your sample data, Jones reports to the emplid of Bird, J. Smith reports to the emplid of Franks, Art and Franks, Art reports to the emplid of Ballard, M.
Ballard, M and Bird, J would have a position title of "Dept Head" and Franks, Art would have a position title of "Ast Director".
However you should be able to use something like the following expression to get the immediate manager/supervisor:
ImmedSup: Nz([Ast sup/lead], Nz([Supervisor],Nz([Ast Director], Nz([Dept Head],"Top Dog"))))
Duane Hookom
(normalization snob)
Sent: Tuesday, September 5, 2017 5:22 PM
To: Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]
Subject: Re: Re: [MS_AccessPros] Specific Grouping quesion for a report
Jim,
I was hoping to see something like
[SupervisorTable] table that stores the organization hierarchy
[Position No] this is the employee position number
[Reports To] this is their immediate supervisor/managerSent: Tuesday, September 5, 2017 1:19 PM
To: luvmymelody@yahoo.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Specific Grouping quesion for a report
Hello all,
I am trying to create a report that shows the Reports to for Accruals of vac, sick. I have a table that has all of the Reports to from the following
Dept Head
Asc/Ast Dir
Supervisor
Ast Sup/Lead
The problem is that some employees only have a Dept Head and one only has a supervisor. the users would like to have the lowest person on the report to be the grouping header.
Currently I have the following sql statement
SELECT SupervisorTable.[Person Nm], SupervisorTable.[Person Id], AccrualsForReport.sick, AccrualsForReport.comp, AccrualsForReport.vac, AccrualsForReport.[Accrual Proc Dt], AccrualsForReport.[Last Name], AccrualsForReport.[First Name], SupervisorTable.[Ast Sup/Lead], SupervisorTable.Supervisor, SupervisorTable.[Asc/Ast Dir], SupervisorTable.[Dept Head]
FROM SupervisorTable INNER JOIN AccrualsForReport ON SupervisorTable.[Person Id] = AccrualsForReport.Emplid
WHERE (((SupervisorTable.[Person Id]) Not Like "1208509350") AND ((SupervisorTable.[Dept Head]) Is Not Null));
I do not see a clear way of getting the lowest Reports to with so many different variables.
Thank You for any advice
Jim Wagner
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
Tidak ada komentar:
Posting Komentar