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 a table to pre-existing report

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I'm trying to add <any> table to <any> standard report so I can understand the extension process a little better.

The example I am using is adding the table InventItem to 1306 (Sales Invoice) and looking to add a couple of random fields:

pastedimage1662465937024v1.png

Is this possible using extensions? I'm trying to adapt AL code I've written in the tutorials and getting nowhere fast. Is there a T-template I'm not using? I realise my syntax must be apalling, but I can't find any guide on how to do this.

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

    Hi,

    Please follow the link for the report extension,

    docs.microsoft.com/.../devenv-report-ext-object

  • Community Member Profile Picture
    on at

    Hi Nitin,

    Thanks for that - I think that's one of the (many) pages I've read before posting. To clarify, I'm not trying to add an extension of an existing table to a report that's already in the report - I'm trying to add into a report a table that isn't included at all in the original. My example is trying to add InventItem into the sales invoice. I would presume I can link the line item on the invoice to the itemid on inventitem and then access any field on inventitem - just like I can if I'm creating a new report.

    Apologies if I'm mis-understanding the link you've sent!

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    In that case please follow the below code what I tried to add Integer table after Sales Invoice Line table. You can also add in the same way and change accordingly.

    reportextension 58300 MyReport extends "Standard Sales - Invoice" //1306

    {

       dataset

       {

           addafter(line) //Sales Invoice Line Data Item

           {

               dataitem(Integer; Integer) // It will add new Integer Dataitem after Sales Invoice Line Data Item.

               {

                   column(Number; Number)

                   { }

               }

           }

       }

    }

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 2,362

#2
YUN ZHU Profile Picture

YUN ZHU 867 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans