Announcements
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!
Hi, Nitin. Thanks for the suggestion. Unfortunately, this gives me the same issue I described... I get several records with the *_AssemblyHeader columns populated and null for the *_AssemblyLine colums, and then I get the rest of the rows with the *_AssemblyLine columns populated and the *_AssemblyHeader columns null. Any other recommendations?
Thanks!
-- Jared
Hi,
Please give a try of below code.
reportextension 50050 "Assembly Order Report Ext" extends "Assembly Order"
{
RDLCLayout = './AssemblyOrder.rdl';
dataset
{
addbefore("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") { }
}
}
addlast("Assembly Line")
{
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") { }
}
}
}
}
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156