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

why custom field data not show in report

(9) ShareShare
ReportReport
Posted on by 355
i am working on custom report and i make custom field itemdescription on sales line i give this field both tables before posting and after posting sales invoice and when i enter data i see in sales invoice as well as on posted sales invoice but on report this field data not show i add clumn of this itemdesciption field and creat package and add this field in layout 
and how we handle this condituon if vat is 0 then its column not show in report i make word layout 
I have the same question (0)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,169 Super User 2026 Season 1 on at

    If your custom ItemDescription field is of type BLOB (e.g. used for long or formatted text), it won’t show directly in Word layouts unless you calculate and convert it into a text variable in the AL report code.

     

    Here’s how to handle it: (i did this for Tax Invoice adjust your code according to your requirements)

     
     dataitem(WorkDescriptionLines; "Integer")
                {
                    DataItemTableView = sorting(Number) where(Number = filter(1 .. 99999));
                    column(WorkDescriptionLineNumber; Number)
                    {
                    }
                    column(WorkDescriptionLine; WorkDescriptionLine)
                    {
    
                    }
    
                    trigger OnPreDataItem()
                    var
                        myInt: Integer;
                    begin
                        "Sales Invoice Header"."Work Description".CreateInStream(WorkDescriptionInstream, TextEncoding::UTF8);
                    end;
    
                    trigger OnAfterGetRecord()
                    var
                        TypeHelper: Codeunit "Type Helper";
                    begin
                        if WorkDescriptionInstream.EOS then
                            CurrReport.Break();
                        WorkDescriptionLine := TypeHelper.ReadAsTextWithSeparator(WorkDescriptionInstream, TypeHelper.LFSeparator());
                    end;
    
                    trigger OnPostDataItem()
                    var
                    begin
                        Clear(WorkDescriptionInstream);
                    end;
    
    
                }
     

    Assign ItemDescText to a global variable and bind that to the Word layout.

     

    Also, for the VAT column, use a visibility condition in the layout like:

     
    =IIF(Fields!VATAmount.Value = 0, False, True)
     

    Lastly, check out Mr. Yun Zhu’s blog for more Word layout handling tips:

    🔗 https://yzhums.com/27951/

     

    ✅ Mark this answer as verified if it helps you.

  • LA-02071030-0 Profile Picture
    355 on at
     
    This is custom field itemdescription of data type text[500] which data npot populate on reports 
    and for vat this expresion i write in vat column 
    =IIF(Fields!VATAmount.Value = 0, False, True)
  • LA-02071030-0 Profile Picture
    355 on at

    vat% come like this
     
  • Verified answer
    YUN ZHU Profile Picture
    99,086 Super User 2026 Season 1 on at
    Hi, First check whether this value is included in the following file. If not, it is a problem with the field addition. If it is, it is a layout problem.
    Dynamics 365 Business Central: Save report dataset to Excel from the request page (Report Inspector)
     
    Hope this helps.
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at
    Hi
    It seems to be misconfigured. Could you check if you entered the field name correctly? That value of 15000 doesn't seem right to me.
    =IIF(Fields!VATPercent.Value = 0, 0, Fields!VATPercent.Value)
    Best
    GR

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 March 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,005 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans