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?
*This post is locked for comments
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()));
}
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156