Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

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,419 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,419 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,419 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,155 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans