web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Inventory Trial Balance Reporting

(0) ShareShare
ReportReport
Posted on by

I'm having some trouble putting together an SSRS report to show the historical layers for inventory items that make up the current on-hand quantity. I currently have a report that shows both the on-hand quantity and all of the layered transactions (sales and purchases) that make up that quantity, but going forward, I would like only to see the most recent layers associated that make up the current quantity. If we use the same item for the next 5 years, I don't want tosee 5 years worth of transactions if the last 7 transactions actually make up the current quantity. Not sure how to write that in SQL to translate to my report.

Anyone else done something like this?

*This post is locked for comments

I have the same question (0)
  • L Vail Profile Picture
    65,271 on at

    Have you considered excluding the layers where the receipt has been completely sold?

    Leslie

  • Community Member Profile Picture
    on at

    I have not tried that. To be honest, I'm not sure what that would look like script wise. Here's how I am getting the FIFO value based on the most recent transactions and the current qty on-hand:

    -----------FIFO VALUE CALC----------------
    ,
    (select SUM(QUANTITY * UNITCOST) AS 'CURRVALUE'
    from x_inventory_trx_hitb
    WHERE SITE = ts.SITE AND ITEMNMBR = ts.ITEMNMBR
    HAVING SUM(QUANTITY) = (SELECT TOP 1 QUANTITY FROM x_inventory_trx_hitb_sum WHERE SITE = ts.SITE AND ITEMNMBR = TS.ITEMNMBR)) AS 'FIFOVALUE'
    -----------------------------------------------------------------

  • Verified answer
    Victoria Yudin Profile Picture
    22,769 on at

    Hi Jason,

    I think Leslie is exactly right. Please take a look at this view on my blog where I am excluding any cost layer that has no quantity left to sell: victoriayudin.com/.../sql-view-for-inventory-quantities-on-hand

    That may give you a good starting point for your report.

  • Suggested answer
    Community Member Profile Picture
    on at

    I was able to do exactly as you suggested. Thanks for your help! I got the exact report we needed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans