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

Community site session details

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

How I can External Document Number in Standard Stantment Report get data?

(0) ShareShare
ReportReport
Posted on by 37

Screenshot-_2800_97_2900_.pngScreenshot-_2800_98_2900_.pngHello all,

We have created a customized "Customer Statement report" in Business central for our Customers. The customer wanted to add a column "External doc no" in the report.

we have added a column "External doc no" in the data item "Sales Invoice Header" under the "DtldCustLedgEntries" data item. but when we want to modify the "word layout" of the report the table has the repeat data in one section under DtldCustLedgEntries, so when we added the column "External doc no" in this table that will give empty data under this column!

Is there any way we can get data in the column External doc no?

Does any help, please?

Thanks.

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: How I can External Document Number in Standard Stantment Report get data?

    I think you can create a global variable and on after get record you can assign the external document number to the the new variable created, make the new variable as the new column in the report.

  • Lama Profile Picture
    37 on at
    RE: How I can External Document Number in Standard Stantment Report get data?

    Thanks For your response

    I will try it now.

  • Lama Profile Picture
    37 on at
    RE: How I can External Document Number in Standard Stantment Report get data?

    I need more help from you, please!

    I wrote this code, this is what you meant?

    okay, but now, how I can use the variable in the word layout? I didn't find it in the word layout after the built?!!

    reportextension 50112 CustomerSR extends "Standard Statement"

    {

       dataset

       {

           modify(DtldCustLedgEntries)

           {

               trigger OnAfterAfterGetRecord()

               var

                   ExternalDocNumLL: Record "Sales Invoice Header";

               begin

                   ExternalDocNumLL.SetRange("External Document No.");

               end;

           }

       }

    }

  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    RE: How I can External Document Number in Standard Stantment Report get data?

    Hi, I'm sorry I haven't done a detailed test, but I think the following should work.

    pastedimage1674701197427v1.png

    Standard Code:

    pastedimage1674701240574v2.png

    Hope this helps.

    Thanks.

    ZHU

  • Lama Profile Picture
    37 on at
    RE: How I can External Document Number in Standard Stantment Report get data?

    Thanks, ZHU

    But I need to add External Document No. on the DtldCustLedgEntries data item.

    can you help me with that?

  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    RE: How I can External Document Number in Standard Stantment Report get data?

    Hi, how about adding a flowfield field to "Detailed Cust. Ledg. Entry" table first? In this way, the processing in the report will be simpler.

    pastedimage1674716603807v1.png

    For example,

    pastedimage1674716904383v2.png

    Hope this helps.

    Thanks.

    ZHU

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 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans