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

Data not displayed in report

(0) ShareShare
ReportReport
Posted on by 700

Hi All,

I have created a report named 'Job Task Details', which gets it's data from 'Employee', 'Job', 'Job Task' and 'Job Planning Line' tables.

Whenever I am running the report, data from Employee table gets displayed whereas remaining columns are coming blank.

Is there any issue with the linking of data items or any other issue.

I have attached the source code.

Please tell me the correct way.

Thanks !

report 50201 "Job Task Details"
{
    DefaultLayout = RDLC;
    RDLCLayout = 'JobTaskDetails.rdl';
    ApplicationArea = All;
    Caption = 'Job Task Details';
    UsageCategory = ReportsAndAnalysis;

    dataset
    {
        dataitem(Employee1;Employee)
        {
            RequestFilterFields = "Office Location", "Department", "No.";
            //PrintOnlyIfDetail = true;
            // DataItemLink = "No." = field("Employee No.");

            column(Office_Location;"Office Location") { }
            column(Department; Department) { }
            column(Job_Title; "Job Title") { }


         
            dataitem(Job; Job)
            {
                //DataItemLinkReference = Employee1;
                DataItemLink = "No." = FIELD("No.");
                RequestFilterFields = "No.", Status, "Bill-to Customer No.";
                //PrintOnlyIfDetail = true;

                column(FORMAT_TODAY_0_4_; Format(Today, 0, 4))
                {
                }
                column(COMPANYNAME; COMPANYPROPERTY.DisplayName)
                {
                }
                column(CurrReport_PAGENO; CurrReport.PageNo)
                {
                }
                column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl)
                {
                }

                column(Bill_to_Name; "Bill-to Name") { }                      //customer name 
                column(Bill_to_Contact_No_; "Bill-to Contact No.") { }         //customer contact person
                column(No_; "No.") { }                                         //Job Code
                column(Description; Description) { }                           //Job Description
                column(Project_Manager; "Project Manager") { }                 //Job Owner
                //  column(Job_Title; Employee."Job Title") { }
                column(Job_Source; "Job Source") { }                           //Job Source
                column(Projects_type; "Projects type") { }                     //Job type
                column(Role__at_client_firm_; "Role (at client firm)") { }
                column(Clientfilename; Clientfilename) { }                     //Clientfilename
                column(Clientfilenumber; Clientfilenumber) { }
                column(Clientmatternumber; Clientmatternumber) { }
                column(ReceivedDateTime; ReceivedDateTime) { }                 //Date Time Job Received
                column(DueDateTime; DueDateTime) { }                           //Due Date Time
                column(Priority; Priority) { }                                 //Job Priority
                column(Starting_Date; "Starting Date") { }                     //Job Starting Date
                column(Ending_Date; "Ending Date") { }                         //Job Ending Date
                column(ReturnDateTime; ReturnDateTime) { }                     //Return Date Time
                column(DeadlineRenegotiated; DeadlineRenegotiated) { }
                column(OriginalDueDateTime; OriginalDueDateTime) { }
                column(Status; Status) { }                                     //Job Status
                column(Feedbacktype; Feedbacktype) { }
                column(Comments___from_the_client; "Comments - from the client") { }
                column(ErrorRating; ErrorRating) { }
                column(Comment_from_Exigent; "Comment from Exigent") { }       //Internal Comments



                dataitem("Job Task"; "Job Task")
                {
                    DataItemLink = "Job No." = field("No.");
                    // PrintOnlyIfDetail = true;

                    column(Job_Task_No_; "Job Task No.") { }
                    column(TaskDescription; Description) { }                    //Task Description
                    column(Job_Task_Type; "Job Task Type") { }
                    column(Task_Classification; "Task Classification") { }      //Task Category
                    column(Customer_Work_Type; "Customer Work Type") { }

                    dataitem("Job Planning Line"; "Job Planning Line")
                    {
                        DataItemLink = "Job Task No." = field("Job No.");

                        column(No; "No.") { }
                        //column(Task Owner Designation)
                        column(Quantity; Quantity) { }                         //Expected Hours To Complete Task

                        //Expected Starting DateTime
                        //Expected Ending DateTime

                        //Actual Starting DateTime
                        //Actual Ending DateTime

                    }
                    // }


                    // trigger OnAfterGetRecord()
                    // begin
                    //     Employee.Get("Employee No.");
                    //     // Clear(EmpLoc);
                    //     // Clear(EmpDep);
                    //     // if Employee.Get("Employee No.") then begin
                    //     //     // EmpLoc := Employee."Office Location";
                    //     //     EmpDep := format(Employee.Department);
                    //     // end;
                    // end;
                }

                trigger OnPreDataItem()
                var
                    myInt: Integer;
                begin
                    SetRange(ReturnDateTime, FromDate, ToDate);
                    //     //Job.SetFilter("Project Manager", UserId);
                    //     // Employee.SetFilter("AD user name", "Project Manager");
                    //     // Employee.SetFilter("Job Title", "Project Manager");
                end;
            }
        }
    }

    requestpage
    {

        layout
        {
            area(content)
            {
                field(FromDate; FromDate)
                {
                    Caption = 'From Date';
                    ApplicationArea = All;
                }
                field(ToDate; ToDate)
                {
                    Caption = 'To Date';
                    ApplicationArea = All;
                }
            }
        }
        // trigger Onopenpage()       //sets default value for the Status filter as 'Active'
        // var
        //     myInt: Integer;
        // begin
        //     Employee1.SetRange(Status, Employee1.Status::Active);
        // end;

        // actions
        // {
        // }
    }

    labels
    {
    }

    // trigger OnPreReport()
    // begin
    //     EmployeeFilter := Employee1.GetFilters;
    // end;

    var
        FromDate: DateTime;
        ToDate: DateTime;
        Employee: Record Employee;
        AbsenceFilter: Text;
        EmployeeFilter: Text;
        // Employee___Staff_AbsencesCaptionLbl: Label 'Employee - Staff Absences';
        CurrReport_PAGENOCaptionLbl: Label 'Page';


}


















I have the same question (0)
  • Suggested answer
    divyeshchitte Profile Picture
    970 on at

    Can you let me know the reason to link

               dataitem(Job; Job)

               {

                   //DataItemLinkReference = Employee1;

                  ----->>> DataItemLink = "No." = FIELD("No.");

  • Dynamics 365 Business Central Profile Picture
    700 on at

    Just linking the parent dataitem with the child one. As the data is coming from both the tables..

    What should be the correct approach?

    Actually I am new to BC

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

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans