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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

¿Standard BC date fields not showing on PO Report when the first line is a comment?

(1) ShareShare
ReportReport
Posted on by 184
This is a very strange bug relating to the standard Requested Receipt Date and Promised Receipt Date fields in the Purchase Order (Purchase Header Table 38, Purchase Order Page 50).
 
The date fields have already been added to the Purchase Order Word Report and are displayed fine—unless the first line in the Purchase Line table is of type Comment, in which case the field values are not displayed at all.
 
Any idea how it would be possible to fix this buggy behavior, perhaps hopefully with a few lines in a table or report extension? Would it be easier than creating 2 new date fields, adding them to the report, and flowing them over to the Purchase Invoice table/page/reports also...?
 
 
Thanks!
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at
    Hi, I briefly tested it (Resource and Item), and it seems that these two dates will not be printed by default. Is the layout or report customized?
     
     
    Hope this helps.
    Thanks.
    ZHU
  • CU05061853-0 Profile Picture
    184 on at
    HiYUN ZHU, thank you for looking into this. 
     
    There is no extension or app customisation built for it; we simply added the below standard fields that come with BC in the Word report.
     
    Purchase_Header/Purchase_Line/RequestedReceiptDate
    Purchase_Header/Purchase_Line/PromisedReceiptDate
     
    They are showing on the report—except if the first line in the Purchase Line table is of type Comment (or any type other than Item). Was hoping there is something in the Report that can be annulled through a small extension.
  • Suggested answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at
    I checked the standard code, and the two standard fields are taken from the Purchase Line. Not from Purchase Header. When you add them to the layout, the Requested Receipt Date and Promised Receipt Date in the first line should be displayed. 
    But when the type is Comment, because Requested Receipt Date and Promised Receipt Date do not exist, the first line is empty, so it cannot be displayed.
     
    This requires a little customization. You need to add the fields on the Purchase Header to the Report first and then display them without this problem.
     
     
    Hope this can give you some hints.
    Thanks.
    ZHU
     
  • Suggested answer
    CU05061853-0 Profile Picture
    184 on at
    Thanks so much, that's great troubleshooting!
     
    Your article is helpful too, however, I don't think a report extension works in this case, since the columns are already present in the report. Unless I am going about extending it the wrong way as pictured below – I take it creating a new report instead, as a copy of the Standard Purch Order report but moving the desired fields from the Purchase Line dataitem to Purchase Header would resolve this. Then do the same for the Purchase Invoice report...
     
  • CU05061853-0 Profile Picture
    184 on at
    Or perhaps there is a quicker way to copy the value of the original Report fields into newly created fields/variables in the extension, and then add these to the Purch Header report dataset…?
     
    Found this system built-in Record.Copy method in the docs, but not sure where/how to declare it properly; the below code yields an error. Would appreciate some guidance on how to add this in, if it's feasible.
     
    tableextension 50250 PurchHeaderExt extends "Purchase Header"
    {
        fields
        {
            field(50250; CopyRequestedReceiptDate; Date)
            {
                Caption = 'Copy Requested Receipt Date';
            }
            field(50251; CopyPromisedReceiptDate; Date)
            {
                Caption = 'Copy Promised Receipt Date';
            }
        }
    }
     
    reportextension 50250 POReportExt extends "Standard Purchase - Order"
    {
        dataset
        {
            add("Purchase Header")
            {
                column(CopyRequestedReceiptDate; CopyRequestedReceiptDate)
                {
                }
                column(CopyPromisedReceiptDate; CopyPromisedReceiptDate)
                {
                }
            }
        }
     
        trigger OnPreReport()
        begin
            CopyRequestedReceiptDate.Copy(FromRecord: RequestedReceiptDate){};
        end;
    }
     
        "message": "Expected one of the application object keywords (table, tableextension, page, pageextension, pagecustomization, profile, codeunit, report, reportextension, xmlport, query, controladdin, dotnet, enum, enumextension, interface, permissionset, permissionsetextension, entitlement)",
        "message": "The name 'CopyRequestedReceiptDate' does not exist in the current context.",
        "startLineNumber": 33,
     
     
  • Verified answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at
    Hi, It doesn’t need to be so complicated, and there is no need to copy the standard code. The following should solve the problem.
     
    Hope this helps.
    Thanks.
    ZHU
  • Verified answer
    CU05061853-0 Profile Picture
    184 on at
    Thanks so much, that worked!

    For anyone else trying to do this, don’t forget to also add the rendering section to generate the new report files, copy your previous layout, then change the fields in question to the newly added ones and assign them on the Report Selection Purchase page. 
     
    reportextension 50250 POReportExt extends "Standard Purchase - Order"
    {
        dataset
        {
            add("Purchase Header")
            {
                column(Promised_Receipt_Date; Format("Promised Receipt Date", 0, 4))
                {
                }
                column(Requested_Receipt_Date; Format("Requested Receipt Date", 0, 4))
                {
                }
                //above fixes BC bug of fields not showing on the PO Report when 1st Purchase Line is of type <> Item
            }
        }
        rendering
        {
            layout("CustomPurchaseOrder.docx")
            {
                Type = Word;
                LayoutFile = './Purchases/Document/CustomPurchaseOrder.docx';
                Caption = 'Custom Purchase Order (Word)';
                Summary = 'Custom Purchase Order report with fixed PO date fields.';
            }
            layout("GPFFFPurchaseOrderEmail.docx")
            {
                Type = Word;
                LayoutFile = './Purchases/Document/CustomPurchaseOrderEmail.docx';
                Caption = 'Custom Purchase Order Email (Word)';
                Summary = 'Custom Purchase Order report with fixed PO date fields.';
            }
        }
    }

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May 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,353 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,808 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,371

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans