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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Add self-created Field in Item as a dataset to a report in AL

(0) ShareShare
ReportReport
Posted on by 5

I created this table extension (and page extension) to add fields to Item

tableextension 50100 "Fuu Field" extends Item
{
    fields
    {
        field(50100; "Fuu"; Text[100])
        {
            Caption = 'Fuu';
        }
    }
}

How can I add the field to the Standard Sales - Invoice report dataset?

I tried the following, but neither Fuu_Line nor Fuu_Line_Lbl are recognized

reportextension 50100 FuuReport extends "Standard Sales - Invoice"
{
    RDLCLayout = './src/StandardSalesInvoiceExtended.rdlc';
    
    dataset
    {
        addLast(Line)
        {
            dataItem(Item; Item)
            {
                DataItemLink = "No." = FIELD("No.");
                DataItemLinkReference = Line;
                DataItemTableView = SORTING("No.");
        
                column(Fuu_Line; Fuu) { }
                column(Fuu_Line_Lbl; FieldCaption(Fuu)) { }
            }
        }
    }
}

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Please try to use below code:

    reportextension 50100 FuuReport extends "Standard Sales - Invoice"
    {
        RDLCLayout = './src/StandardSalesInvoiceExtended.rdlc';

        dataset
        {
            addbefore(shipmentline)
            {
                dataItem(Item; Item)
                {
                    DataItemLinkReference = Line;
                    DataItemLink = "No." = FIELD("No.");
                    DataItemTableView = SORTING("No.");

                    column(Fuu_Line; Fuu) { }
                    column(Fuu_Line_Lbl; fuu) { }

                    trigger OnAfterGetRecord()
                    begin
                        fuu := Item."No."; // You can take your new fields value here.
                    end;
                }

            }
            add(Header)
            {
                column(fuu; fuu)
                { }

            }


        }
        var
            fuu: Text;

    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,909 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,145 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 974

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans