web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

(0) ShareShare
ReportReport
Posted on by 129

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!

I have the same question (0)
  • JAngle Profile Picture
    133 on at

    Use report 208 as a guide. It already has the feature you require.

  • MahGah Profile Picture
    15,529 on at
  • AI123456789 Profile Picture
    129 on at

    This code does not work in Business Central, is this C/AL?

  • MahGah Profile Picture
    15,529 on at

    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.

  • AI123456789 Profile Picture
    129 on at

    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.")
                        {

                        }
                    }

                }
            }
        }

    }
    __________
    I hope someone finds this beneficial!
  • Suggested answer
    MahGah Profile Picture
    15,529 on at

    Hi

    Thank you for posting this here. it will help for future questions. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans