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

reportextension add Company information

(0) ShareShare
ReportReport
Posted on by 30

Hi,

I need to add  "Company Information"."Stock Capital" to the "Standard Sales - Quote" with the reportextension.

In the reportextension, I added this (with some custom labels):

        addfirst(Header)
        {
            dataitem("Company Information"; "Company Information")
            {
                //CompanyInfoStockCapital = "Company Information"."Stock Capital";
                column(CompanyInfoStockCapital; "Stock Capital") { }
            }
        }

        add(Header)
        {
            column(Customer_Lbl; Customer_Lbl) { }
            column(Date_Lbl; Date_Lbl) { }
            column(Description_Lbl; Description_Lbl) { }
            column(EAN_Code_Lbl; EAN_Code_Lbl) { }
            column(MSRP_Lbl; MSRP_Lbl) { }
            column(NPU_Lbl; NPU_Lbl) { }
            column(Line_amount_Lbl; Line_amount_Lbl) { }
            column(Cst001_Lbl; Cst001_Lbl) { }
            column(APE_Lbl; APE_Lbl) { }
            //column(CompanyInfoStockCapital; CompanyInfo.Name) { }
        }

But, when I run report, some fields of the "Standard Sales - Quote" are missing:

pastedimage1665479538768v1.png

without addfirst(Header), these fields are visible:

pastedimage1665479796441v2.png

Thanks you for your kind reply,

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

    Hi,

    Try to add as per the following

       dataset

       {

           add(header)

           {

               column(comd; CompanyInformation.fieldname)

               { }

           }

       }

       trigger OnPreReport()

       begin

           CompanyInformation.get;

       end;

       var

           CompanyInformation: Record "Company Information";

  • SebSeb Profile Picture
    30 on at

    Thank Verma,

    It works! I validated your answer.

    Please, why my fisrt test doesnt work addfirst(Header)?

    regards,

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

    Hi,

    Thanks for the confirmation.

    For the Addfirst please visit the below link

    https://github.com/microsoft/AL/issues/6621

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 2,216 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,471 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,369

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans