Tables:
Item
Bom Component
Global Variables:
BomCom Record Bom Component
QTY1 Decimal
QTY2 Decimal
I' am trying to create a report using two tables: Item and Bom Component. I am trying to show all Bom Items with a sub items within the Bom Component table.
So far I have everything but now I need to show the actual qty on hand for the sub item in the Bom Components, which is located in item table.
So my question is how I get the actual qty on hand to show for the sub item in the BOM on the report,
Currently I can see what makes up the BOM in correlation with the BOM Item, but I can not get the Qty on hand for the Sub item.
Item side
OnAfterGet Record
I tried this
BomCom.SETRANGE(BomCom."No.", Item."No.");
BomCom.GET(Item.” No.");
Item."No." := BomCom."No.";
QTY1 := Item.Inventory;
I also tried this
IF BomCom.FIND('-') THEN REPEAT
IF (Item."No." = BomCom."No.") And (BomCom."No." <>'') THEN BEGIN
Item.GET(BomCom."No.");
IF BomCom.FIND('-') THEN
QTY2 := Item.Inventory;
END;
UNTIL BomCom.NEXT=0;
Can someone help? ](*,)
0
Comments
RIS Plus, LLC
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I would create a new Item variable called ComponentItem, just to make sure you know which one you're working with in your code.
RIS Plus, LLC
I am trying to do something similar however I have a report which shows the list of Bill of Materials within a BOM Jnl. I would like to show the components for those items within Bill Of Materials (IF bill of material is true). I have BOM Component as a dataitem twice the first shows the list of bill of materials for the Jnl, I want the second dataitem item to list the components within the parent item of the Bill of material listed from the first dataitem however i'm not sure how to go about it?