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

Document Date not available in standard Customer Statement Report?

(4) ShareShare
ReportReport
Posted on by 184
When navigating the XML parts of the Customer Statement report, the Document Date field is not visible anywhere, only the Posting & Due Dates—strangely/tantalizingly, there is a DocDateCaption field as standard, though I cannot imagine any scenario where this could be useful without the actual Document Date to be used in the loop…
 
It seems that the Document Date is only available in table 21 /Cust. Ledger Entry/, not in table 379 /Detailed Cust. Ledg. Entry/. I have attempted the below report extension by taking inspiration from the standard PostDate_DtldCustLedgEntries & DueDate_DtldCustLedgEntries fields, but the Document Date field is still not showing when running the newly imported report. 
 
Where am I going wrong?
 
 
Also, does anyone know what the row containing Currency2Code_CustLedgEntryHdr & StartBalance does? Not sure if removing it would affect the report.
 

EDIT
I have tried re-editing this post multiple times, but, inexplicably, after publishing the question, all instances of // (quotation marks) turn into // instead. Here is a screenshot instead:
 
 
 
reportextension 50301 CustomerStatementReportExt extends /Standard Statement/
{
    dataset
    {
        /*
        add(CustLedgEntry2)
        {
            column(DocDate_CustLedgEntry2; Format(/Document Date/))
            {
            }
        }
        */
        addbefore(DtldCustLedgEntries)
        {
            dataitem(MyCustom; /Cust. Ledger Entry/)
            {
                DataItemLink = /Customer No./ = field(/No./);
                DataItemLinkReference = Customer;
                DataItemTableView = sorting(/Customer No./, /Document Date/, /Currency Code/);
                column(My_DocDate_CustLedgEntry; Format(/Document Date/)) { }
 
                /*trigger OnAfterGetRecord()
                begin
                    My_DocDate_CustLedgEntry := CustLedgEntry2./Document Date/;
                    CustLedgEntry2.SetCurrentKey(/Customer No./, /Document Date/, /Currency Code/);
                end;
                */
            }
        }
    }
    rendering
    {
        layout(/MyCustomerStatement.docx/)
        {
            Type = Word;
            LayoutFile = './Document/MyCustomerStatement.docx';
            Caption = 'My Customer Statement (Word)';
            Summary = 'Custom Customer Statement report with fixed doc date fields.';
        }
        layout(/MyCustomerStatementEmail.docx/)
        {
            Type = Word;
            LayoutFile = './Document/MyCustomerStatementEmail.docx';
            Caption = 'My Customer Statement Email (Word)';
            Summary = 'Custom Customer Statement report with fixed doc date fields.';
        }
    }
    var
        My_DocDate_CustLedgEntry: Date;
}
 
tableextension 50301 CustLedgEntryExt extends /Cust. Ledger Entry/
{
    keys
    {
        key(MyKey1; /Document Date/)
        {
        }
    }
}
I have the same question (0)
  • GP-05061852-0 Profile Picture
    25 on at
    Document Date not available in standard Customer Statement Report?
    My second attempt, to no avail
     
    ​​​​​​​
  • Suggested answer
    YUN ZHU Profile Picture
    93,872 Super User 2025 Season 2 on at
    Document Date not available in standard Customer Statement Report?
    Hi, I took a quick look and it seemed like the following would be enough.
     
    So try the following:
     
    Hope this helps.
    Thanks.
    ZHU
  • GP-05061852-0 Profile Picture
    25 on at
    Document Date not available in standard Customer Statement Report?
    Thanks for having a look at this YUN ZHU, but the field in question is "Document Date", not the Document No.
  • Suggested answer
    YUN ZHU Profile Picture
    93,872 Super User 2025 Season 2 on at
    Document Date not available in standard Customer Statement Report?
    Sorry, my bad.
    A simple way is to add this field (Posting Date) first, so that there will be much less processing in the report.
    reportextension 50119 MyExtension extends "Standard Statement"
    {
        dataset
        {
            add(DtldCustLedgEntries)
            {
                column(CLE_Document_Date; "CLE Document Date")
                { }
            }
        }
    }
    
    tableextension 50118 MyExtension extends "Detailed Cust. Ledg. Entry"
    {
        fields
        {
            field(50100; "CLE Document Date"; Date)
            {
                Caption = 'Cust. Ledger Entry Document Date';
                FieldClass = FlowField;
                CalcFormula = lookup("Cust. Ledger Entry"."Document Date" where("Entry No." = field("Cust. Ledger Entry No.")));
            }
        }
    }
     
    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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,214

#2
Sumit Singh Profile Picture

Sumit Singh 2,145

#3
YUN ZHU Profile Picture

YUN ZHU 1,887 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans