Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

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

Posted on by 30

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.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,339 Super User 2024 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

  • Lama Profile Picture
    Lama 30 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
    YUN ZHU 73,339 Super User 2024 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
    Lama 30 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;

           }

       }

    }

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

    Thanks For your response

    I will try it now.

  • Community Member Profile Picture
    Community Member Microsoft Employee 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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans