Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Inventory value statement with standard cost breakdowns report

Posted on by 415

Hi All, 

In AX 2012 R2, Inventory & Warehouse Management > Reports > Status > Inventory Status > Inventory Value Statement with Standard Cost Breakdown 

When i run this report in parameters by selecting "Multi" option. Code is hitting InventCostReport Class > Method AssignAmounttoTemp method. 

Inside that method there is switch case as shown below. It has default condition to throw the error.

So when i run the report, for one of the items its having a different enum value which is not mentioned in below cases and its hitting default condition and throwing the error. 

No Customizations are made to this report. Does this code fixed in new versions above 2012 r2?  If yes, can you show a snapshot of it?  Any details/comments?

7750.cost.JPG

*This post is locked for comments

  • Verified answer
    DynamicsAXExplorer Profile Picture
    DynamicsAXExplorer 415 on at
    RE: Inventory value statement with standard cost breakdowns report

    This is fixed in newer version.

    We added single line of code which is fixed in AX 2012 R3 as below

    InventCostReport_CostBase class > method > AssignAmountToTemp    

    Under Switch case  added DirectOutsourcing line as shown below

    switch (_bomCostGroup.CostGroupType)

           {

               case CostGroupType::Undefined:

                   _inventCostTmpTransBreakdown.UndefinedAmount = _amount;

                   break;

               case CostGroupType::DirectMaterials:

                   _inventCostTmpTransBreakdown.MaterialsAmount = _amount;

                   break;

               case CostGroupType::DirectManufacturing,

                   CostGroupType::DirectOutsourcing:                                                            //   This line of code is added in versions above AX 2012 R2 to resolve above error.

                   _inventCostTmpTransBreakdown.ManufacturingAmount = _amount;

                   break;

               case CostGroupType::Indirect:

                   _inventCostTmpTransBreakdown.IndirectAmount = _amount;

                   break;

               default:

                   throw error(strFmt("cost group error %1",_bomCostGroup.CostGroupType));//todo:  remove

                   //throw error(strFmt("@SYS22828", funcName()));

           }

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans