Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Inventory value statement with standard cost breakdowns report

(0) ShareShare
ReportReport
Posted on by 419

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 419 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans