We want to build a report in Microsoft Dynamics AX 2009 to show all employees that worked on a production order.
Into the datasources for this report we drag-n-dropped the
ProdTable
(pt) which is inner joined by ProdID and DataAreaID to the
ProdJournalRoute
(pjr) which is inner joined by EmplID and DataAreaID to the
EmplTable
(et) where we look up the employee's name via the name()
method.
This report yields some funny output:
pjr.TransDate pjr.EmplID et.EmplID et.name()
2010-07-20 05820
2010-07-20 05820 05820 Doe, John
2010-07-20 05820 05820 Doe, John
2010-07-21 00341 05820 Doe, John
2010-07-21 00007 00341 Snow, Jon
... ... ... ...
(Columns and rows snipped)
See? Somewhere in the join between ProdJournalRoute
and EmplTable
the EmplID gains a one line offset.
Now I could of course simply copy the name()
method from the EmplTable
to the ProdJournalRoute
table and drop the EmplTable
join altogether, but I'm afraid this only postpones the problem: what can I do to get my join to work? Should I use a handcrafted query and use this as datasource for the report?
(PS: could perhaps somebody with the necessary user rights clean up all these
[[[microsoft] dynamics] AX]
tags? Thank you!)