Announcements
Does anyone know of any way to add in Serial Numbers, linked from the Item Tracking Entries into a Sales Invoice or Sales Credit Memo document layout using RDLC? I'm using report 1306.
I know I need to extend the report and link from the Sales Invoice to the Item Ledger Entries table but am not certain on how to set up the DataItemLink.
Then once this is set up, does anyone know how I'd best set up the grouping in RDLC (e.g. to include all serial numbers under the description for the item).
All help appreciated!
Hi
Thank you for posting this here. it will help for future questions.
For anybody that stumbles across this post looking for an answer, I've solved the issue and it's actually relatively simple.
For some reason there's minimal resource online about how to do this but basically you need to link a data item from the lines to the Value Entry table which has "Item Ledger Entry No." and "Document No." (table 5802), then inside this data item, link to the Item Ledger Entry table.
Here's my code for extending the Sales Invoice (1306) and Credit Memo (1307) reports:
reportextension 50101 "SalesInvoiceExt" extends "Standard Sales - Invoice"
{
dataset
{
addlast(Line)
{
dataitem("Value Entry"; "Value Entry")
{
DataItemLink = "Document No." = field("Document No."), "Item No." = field("No.");
DataItemLinkReference = Line;
column(Item_Ledger_Entry_No_; "Item Ledger Entry No.")
{
}
dataitem("Item Ledger Entry"; "Item Ledger Entry")
{
DataItemLink = "Entry No." = field("Item Ledger Entry No.");
DataItemLinkReference = "Value Entry";
column(Serial_No_; "Serial No.")
{
}
}
}
}
}
}
reportextension 50103 CreditMemoExt extends "Standard Sales - Credit Memo"
{
dataset
{
addlast(Line)
{
dataitem("Value Entry"; "Value Entry")
{
DataItemLink = "Document No." = field("Document No."), "Item No." = field("No.");
DataItemLinkReference = Line;
column(Item_Ledger_Entry_No_; "Item Ledger Entry No.")
{
}
dataitem("Item Ledger Entry"; "Item Ledger Entry")
{
DataItemLink = "Entry No." = field("Item Ledger Entry No.");
DataItemLinkReference = "Value Entry";
column(Serial_No_; "Serial No.")
{
}
}
}
}
}
}
__________
it could be because it is old post and mainly mean for providing example.
As Josh mentioned look into report 208
or see what has changed between C/AL and AL then see if you can tweak the code.
I could not find any other example.
This code does not work in Business Central, is this C/AL?
Hi
Please see this post
community.dynamics.com/.../how-to-modify-the-sales-invoice-report-to-print-serial-no-lot-no
Use report 208 as a guide. It already has the feature you require.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156