Solved

Dated per batch project costs from Dynamics AX 2009 using SSRS

Posted on 2013-06-17
2
576 Views
Last Modified: 2013-06-20
Hi Experts,

I have written an SSRS report against an AX 2009 database to provide project sales revenue (accrued or invoiced) and costs, per project, per month, to keep an eye on project margins. The data comes primarily from PROJTRANSPOSTING, which suits well. It is important to note that adjustments to costs belong in the month of the adjustment, not the month of the item transaction being adjusted.

I have now been asked to provide a version of this report that drops down to batch level, where revenue can be allocated pro-rata based on batch quantity, but costs need to be those attributed specifically to the batch. The problem I'm finding is that, while PROJTRANSPOSTING has the costs and adjustments date-stamped, INVENTTRANS has (via INVENTDIM) the relevant batch / qty information but a consolidated set of costs over time for the related INVENTTRANSID / PROJADJUSTREFID.

I thought INVENTSETTLEMENT might be the solution, but have found discrepancies between dates on PROJTRANSPOSTING and INVENTSETTLEMENT, and no direct or indirect, specific relation that isn't many-to-many.

Can anyone point me in the direction of some nice little table that has just what I need, or is able to enlighten me on the appropriate relationship?

Thanks for reading,

Mark
0
Comment
Question by:SeeHearMark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
SeeHearMark earned 0 total points
ID: 39261055
OK - I think I have a solution, based on empirical evidence rather than hard facts, so it might only work due to how we are using AX!

Essentially, I use aggregated PROJTRANSPOSTING over the LEDGERTRANSDATE / INVENTTRANSID / PROJADJUSTREF where 'an original transaction', which seems to be LEDGERPOSTINGTYPE <= 50 or =52(???), outer joined to INVENTTRANS, where I use COSTAMOUNTPOSTED for each batch, referenced via INVENTDIM. This assumes that all the rows on PROJTRANSPOSTING for an INVENTTRANSID / PROJADJUSTREF pair will have the same LEDGERTRANSDATE, which they seem to do, and I'm not sure about the LEDGERTRANSTYPE split.

Then, I union this with something very similar for the other range of LEDGERTRANSTYPE (=51 or >= 53), outer joined to INVENTSETTLEMENT on VOUCHERID / INVENTTRANSID to pick up COSTAMOUNTADJUSTMENT, getting the batch again from INVENTTRANS > INVENTDIM using the TRANSRECID = RECID relation.

This seems to work for me, until someone does something in AX they haven't done so far, and breaks it. So the question is now, can anyone tell me what might break it - where any holes are in my assumptions - so I can be preapred?

Cheers,

Mark
0
 

Author Closing Comment

by:SeeHearMark
ID: 39264009
Looks like not, but I'll leave my solution on here in case it's useful to others, rather than deleting the question.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS report showing old data. 5 144
Migrating 2 instances of SSRS to a single 2012 instance 3 46
Export Activity Feed in Dynamics CRM 3 30
Show RTF format in an SSRS report 3 46
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question