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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Inventory value statement with standard cost breakdowns report

(0) ShareShare
ReportReport
Posted on by 431

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

I have the same question (0)
  • Verified answer
    DynamicsAXExplorer Profile Picture
    431 on at

    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

Responsible AI policies

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

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Volodya Profile Picture

Volodya 2

#2
tgudwanski Profile Picture

tgudwanski 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans