Skip to main content

Notifications

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!

  • Suggested answer
    MahGah Profile Picture
    MahGah 15,428 on at
    RE: Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

    Hi

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

  • AI123456789 Profile Picture
    AI123456789 129 on at
    RE: Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

    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!
  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

    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
    AI123456789 129 on at
    RE: Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

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

  • MahGah Profile Picture
    MahGah 15,428 on at
    RE: Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

    Hi

    Please see this post

    community.dynamics.com/.../how-to-modify-the-sales-invoice-report-to-print-serial-no-lot-no

  • JAngle Profile Picture
    JAngle 33,159 on at
    RE: Adding Serial Numbers to Sales Invoice/Credit Memo Report Layouts (RDLC)

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

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans