-2

I am a newbie to the ax report developing. Actually i am a networking guy but put into a position i have to write reports. here is my delima, i have an open order sales line report that is open and need to see if we have available inventory, which is configuration specific and need to display values only in m001 warehouse.

through search i found a post here by Vince Perta (Finding the Total Available and Available physical for an Item/Warehouse), which gave the following code. seems to work but want to be able to build a report from it.

static void FindOpenSalesLineAvailPhys(Args _args)
{
    SalesLine salesline;
    InventDim inventDim;
    InventDimParm inventDimParm;
    InventOnHand inventOnHand;
    ;

    while select salesLine where salesLine.SalesStatus == SalesStatus::Backorder
    {
        inventDim = salesLine.inventDim();
        inventDimParm.initFromInventDim(inventDim);
        inventDimParm.WMSLocationIdFlag = NoYes::No;
        inventOnHand = InventOnHand::newItemDim(salesLine.ItemId, inventDim, inventDimParm);
        if (inventOnHand.availPhysical())
        {
            info(strfmt("Sales Order %1 Line %2 Item Id %3 Available Physical (ignoring Location) %4",
                salesLine.salesId, salesLine.LineNum, salesLine.ItemId, inventOnHand.availPhysical()));
        }
    }
}

Can anyone help please?

Community
  • 1
  • 1
  • You need to be more specific than this. What is your reporting needs and why would you use the above code for this? There are standard reports the gives invent on hand based on various criteria. – Jan B. Kjeldsen Apr 29 '13 at 13:37
  • The need was to see for a given sales order that needs to be filled and see if we have inventory to pick. we currently have a report in place but it does not look at configuration. thus we have inaccurate qty for inventory to pick from. – user2324065 May 08 '13 at 22:35

2 Answers2

1

Building a report is quite a generic task for an AX developer. It's like "how to create a form on c#". You need to be more specific after going to some generic development documentation where you can find the basics of creating reports.

Will be usefull that you specify your version, as reporting has changed a lot on AX 2012.

EDIT

HOWTO: Get inventory values from X++

j.a.estevan
  • 3,057
  • 18
  • 32
  • I was able to build a report to display open order from the salesLine table but don't know how to incorporate the inventsum table to display the physical available qty. the query has to be configuration specific. – user2324065 May 08 '13 at 22:38
  • I wrote about that subject a while ago. Comments are in spanish but X++ code is self-explanatory: http://www.jaestevan.com/howto-consultar-inventario-disponible-mediante-x – j.a.estevan May 14 '13 at 14:24
0

Where are you trying to build your report ? Is that in Ax2009 or Ax2012.

If it is in Ax2009 you could just add this a display method and drag it to the report If it is ax2012 i think you can use an RDP class to do this and that is pretty simple

Casperkamal
  • 1
  • 1
  • 5