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

Report Data Item Link

(0) ShareShare
ReportReport
Posted on by 147

Hi there,

I am editing the standard Sales Invoice as a custom report, so I am attempting to add in some other data items/links.

I need to join from the Sales Invoice Line table to the Job table, so that I can put the Description of the job on the invoice.

This is the code I have put in to do that:

                    dataitem(JobHeader; "Job")
                    {
                        DataItemLink = "No." = FIELD("Job No.");
                        DataItemLinkReference = Line;

                        column(Description; Description) { }

                    }

The field appears in the data set and in Report Builder, and I can put it on the report, but when I generate the report where that field should be it comes up blank.

Same goes for this data item where the field is part of a table extension:

                    dataitem(JobTask; "Job Task")
                    {
                        DataItemLink = "Job Task No." = FIELD("Job Task No."); //Left = the field in table in this dataitem, Right = the field in the table which we are joining to
                        DataItemLinkReference = Line;

                        column(xPONumber; JobTask.xPONumber) { }

                    }

Any advice on why these fields are available in the report but not showing any data would be very much appreciated

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    150 on at

    For two pieces of data more dataitems don’t seem worthwhile. Instead you could create two variables and populate them when data exists. I’d think the dataitem is failing as the link doesn’t always exist and you need to pass at least the primary key fields. For instance if you have a comment line. In the line dataitem within the OnAfterGetRecord trigger place a GET for the job table. Use the “job no.” From the line dataitem. You could place an if statement for the GET too. This way the variable stays blank when no data exists. Job task uses the job no. and the job task no. for a GET

    Resources: docs.microsoft.com/.../devenv-get-find-and-next-methods

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,965 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,125 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 961 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans