I am trying to add two DataItems to the existing Assembly Order report in order to show details from the Lot Numbers assigned to both the header (resulting item) and the consumed BOM line items.
reportextension 50050 "Assembly Order Report Ext" extends "Assembly Order" { RDLCLayout = './AssemblyOrder.rdl'; dataset { addlast("Assembly Line") { dataitem(WOHeaderLotNo; "Reservation Entry") { DataItemLinkReference = "Assembly Header"; DataItemLink = "Source ID" = field("No."); DataItemTableView = where("Source Type" = const(900)); column(LotNo_AssemblyHeader; "Lot No.") { } column(LotQty_AssemblyHeader; "Quantity") { } dataitem(WOLineLotNo; "Reservation Entry") { DataItemLinkReference = "Assembly Line"; DataItemLink = "Source ID" = field("Document No."), "Source Ref. No." = field("Line No."); DataItemTableView = where("Source Type" = const(901)); column(LotNo_AssemblyLine; "Lot No.") { } column(LotQty_AssemblyLine; "Quantity") { } } } } } }
When I do it this way with the line item detail DataItem underneath the Header DataItem in the hierarchy, the line item lot details only populate when the header has a Lot number assigned, which isn't ideal. But if I move the line item detail dataitem to be at the same level as the header dataitem (which seems like the right way to do it), then I get a strange unlinked data set - there is a set of rows with the line item detail lot number columns populated but the header lot columns all null, and there is a set of rows with the header lot columns populated but the detail lot columns all null. I would expect there to be a single set of rows that has both the header lot and detail lot columns populated.
Can someone help me set this up properly? Thank you!