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

Notifications

Announcements

No record found.

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 251
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,136 Super User 2025 Season 2 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
    251 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
    251 on at

    vat% come like this
     
  • Verified answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 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,213 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

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,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans