Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Stock Replenishment Report template

Posted on by Microsoft Employee

Hi,

I am designing a Stock Replenishment in Nav 2013 using SQL Server 2012 Report Builder. I want to write a code, for if the Inventory Qty. for an Item is less than the Minimum Stock Qty. the record line is to be displayed, else the record line show not be displayed.

Please help.

*This post is locked for comments

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Stock Replenishment Report template

    write in the code - trigger Item-OnAfterGetRecord - following:

    Item.calcfields(Inventory);

    if Item.Inventory >= Item."Minimum Stock Qty." then

     currreport.skip;

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Stock Replenishment Report template

    Hi,

    Could you verify the solution?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Stock Replenishment Report template

    Thanks Mahesh for the solution, it worked.

  • Verified answer
    mmv Profile Picture
    mmv 11,465 on at
    RE: Stock Replenishment Report template

    Hi,

    On the report Layout, for that line, in the Properties -> Visibility, you may write the expression Fields!InventoryQty.Value >= Fields!MinimumStockQty.Value

    In the above InventoryQty and MinimumStockQty are the values defined in the DataItem

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans