Category Archives: SSRS

[AX 2012 R3] How to get avail quantity of a product by ItemId and get details by inventory dimensions (InventDimId)

 InventDimOnHand onHand;
 InventDimOnHandIterator iter;
 InventDimOnHandMember member;
 InventOnhand inventOnhand;
 ItemId itemId;
 InventDim inventDimCrit;
 InventDimParm inventDimParmCrit, inventDimParmOnHandLevel;
 InventDim inventDim;
 InventDimOnHandLevel level;

 itemId = '123456';

 // Known dimensions
 inventDimCrit.wMSLocationId = 'location01';
 inventDimCrit = InventDim::findOrCreate(inventDimCrit);

 // Determine which of the known dimensions to use
 inventDimParmCrit.WMSLocationIdFlag = true;

 level = InventDimOnHandLevel::DimParm;

 // Determines the level of detail returned
 inventDimParmOnHandLevel.ItemIdFlag = true;
 inventDimParmOnHandLevel.InventLocationIdFlag = true;
 inventDimParmOnHandLevel.WMSLocationIdFlag = true;
 inventDimParmOnHandLevel.InventBatchIdFlag = true;

 onHand = InventDimOnHand::newPhysicalArrived(itemId, inventDimCrit, InventDimParmCrit, level, inventDimParmOnHandLevel);

 iter = onHand.onHandIterator();
 while (iter.more())
 member = iter.value();
 inventDim = InventDim::find(member.parmInventDimId());
 inventOnHand = InventOnhand::newParameters(itemId, inventDim,inventDimParmOnHand);
 info(con2str([member.parmItemId(), inventDim.inventLocationId, inventDim.inventBatchId, inventDim.LicensePlateId, inventDim.inventSerialId, member.parmInventQty(), inventOnHand.availPhysical()]));;


AX2012 SSRS Unable to log on to Microsoft Dynamics AX

When you run any Report and the system returns the error:

Unable to log on to Microsoft Dynamics AX

The solution, that works for me, is to run the Reporting Services with the same user used for runing the AOS

How to use the Carriage Return on AX2012 & SSRS Reports

Below you can find an example to use the Carriage Return on a SSRS Report, in order to show the data in multiples lines