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...
Suggested Answer

New Data Item in report not showing value

(0) ShareShare
ReportReport
Posted on by 259

Hi, I want to show comments on Sales order lines in a RDLC report.

Below is structure of my report code.

header
{

     line
     {

     }
     // here i have added new data item
     dataitem(SalesCommentLine; "Sales Comment Line")
     {
          DataItemLink = "No." = FIELD("Document No."), "Document Type" = FIELD("Document Type")"Document Line no." = field("Line no.");

          column(CommentsLine; "Comment")
          {

          }
      }

}

After running the report I am getting below error message:

Rendering output for the report failed and the following error occurred: The Value expression for the text box ‘Textbox73’ refers to the field ‘LineComments’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.

I have tried another solution:

I created a text variable, stored value in this variable in OnAfterGetRecord(). I am getting correct value in this variable. I have then added this variable as a column in Line dataset. But after running report I am not getting any value on my report.

Any help in this regard?

  • Suggested answer
    JAngle Profile Picture
    159 on at

    I’d base it on a report that had this already 5900 Service Order. Here is the code. Placement of the data item is similar to what you already have. Check the source code for the good detail

    dataitem("Service Order Comment"; "Service Comment Line")

                       {

                           DataItemLink = "Table Subtype" = FIELD("Document Type"), "No." = FIELD("No.");

                           DataItemLinkReference = "Service Header";

                           DataItemTableView = SORTING("Table Name", "Table Subtype", "No.", Type, "Table Line No.", "Line No.") WHERE("Table Name" = CONST("Service Header"), Type = CONST(General));

                           column(Comment_ServOrderComment; Comment)

                           {

                           }

                           column(TabName_ServOrderComment; "Table Name")

                           {

                           }

                           column(No_ServOrderComment; "No.")

                           {

                           }

                           column(TableLineNo_ServOrderComment; "Table Line No.")

  • Danyal Profile Picture
    259 on at

    Josh, I tried this. This doesn't show any value :( But it changed my order Totals e.g. total quantity, amount etc.

  • Suggested answer
    JAngle Profile Picture
    159 on at

    Maybe you can try doing it more like how dimension line values are displayed. If you use the “show internal info” Boolean on the request page it displays that type of detail. Would just be a case of copying the logic but for comment lines.

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 715 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 452 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 371 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans