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

Duplicate Data in Report

(0) ShareShare
ReportReport
Posted on by 700

Hi All,

I have created a report in which same row is getting displayed 2 times. How to get rid of this issue ?

Attached is the screenshot of the report.

Please suggest.

Thanks !

Duplicate-Data-in-Report.png

I have the same question (0)
  • Suggested answer
    Abhinav Mehra Profile Picture
    on at

    What is your dataitem structure? it is calling through integer table or you have chosen table as dataitem?

  • Dynamics 365 Business Central Profile Picture
    700 on at

    report 50201 "Job Task Details"
    {
        DefaultLayout = RDLC;
        RDLCLayout = 'JobTaskDetails.rdl';
        ApplicationArea = All;
        Caption = 'Job Task Details';
        UsageCategory = ReportsAndAnalysis;
    
        dataset
        {
            dataitem(Resource; Resource)
            {
                RequestFilterFields = "Location", "Department", "Employee No.";
                PrintOnlyIfDetail = true;
                // DataItemLink = "No." = field("Employee No.");
    
                column(Location; Location) { }
                column(Department; Department) { }
                column(Job_Title; "Job Title") { }
    
    
    
                
               
                dataitem(Job; Job)
                {
                    //DataItemLinkReference = Employee;
                    //DataItemLink = "No." = FIELD("Employee No.");
                    DataItemLink = "Project Manager" = field("Time Sheet Owner User ID");
                    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; format("Starting Date")) { }                     //Job Starting Date
                    column(Ending_Date; format("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 Planning Line"; "Job Planning Line")
                    {
                        //DataItemLink = "Job Task No." = field("Job No.");
                        DataItemLink = "Job No." = field("No.");
    
                        //column(Job_Task_No_; "Job Task No.") { }
                        //column(TaskDescription; "Job Task".Description) { }                    //Task Description
                        //column(TaskDescription; Description) { }
                        column(No; "No.") { }
                        //column(Task Owner Designation)
                        column(Quantity; Quantity) { }
    
    
                        column(Job_Task_No_; Job_Task_No_) { }
                        column(TaskDescription; TaskDescription) { }                    //Task Description
                        column(Job_Task_Type; Job_Task_Type) { }
                        column(Task_Classification; Task_Classification) { }        //Task Category
                        column(Customer_Work_Type; Customer_Work_Type) { }
    
    
                        //Expected Hours To Complete Task
    
                        //Expected Starting DateTime
                        //Expected Ending DateTime
    
                        //Actual Starting DateTime
                        //Actual Ending DateTime
    
    
                        trigger OnAfterGetRecord()
                        var
                            myInt: Integer;
                        begin
                            Clear(Job_Task_No_);
                            Clear(TaskDescription);
                            Clear(Job_Task_Type);
                            Clear(Task_Classification);
                            Clear(Customer_Work_Type);
    
                            Rec_JobTask.Reset();
                            Rec_JobTask.SetRange("Job No.", "Job No.");
                            Rec_JobTask.SetRange("Job Task No.", "Job Task No.");
    
                            if Rec_JobTask.FindFirst then begin
    
                                Job_Task_No_ := Rec_JobTask."Job Task No.";
                                TaskDescription := Rec_JobTask.Description;
                                Job_Task_Type := format(Rec_JobTask."Job Task Type");
                                Task_Classification := format(Rec_JobTask."Task Classification");
                                Customer_Work_Type := format(Rec_JobTask."Customer Work Type");
    
                            end
                        end;
                    }
                    // }
    
                    //  }
    
                    // trigger OnPreDataItem()
                    // var
                    //     myInt: Integer;
                    // begin
                    //     SetRange(ReturnDateTime, FromDate, ToDate);
                   
                    // end;
                }
            }
        }
        //}
    
        requestpage
        {
    
            layout
            {
                area(content)
                {
                    field(FromDate; FromDate)
                    {
                        Caption = 'From Date';
                        ApplicationArea = All;
                    }
                    field(ToDate; ToDate)
                    {
                        Caption = 'To Date';
                        ApplicationArea = All;
                    }
                }
            }
           
        }
    
        labels
        {
        }
    
       
    
        var
            FromDate: DateTime;
            ToDate: DateTime;
            Employee: Record Employee;
            AbsenceFilter: Text;
            EmployeeFilter: Text;
            CurrReport_PAGENOCaptionLbl: Label 'Page';
            Rec_JobTask: Record "Job Task";
            Rec_JobPlanningLine: Record "Job Planning Line";
            Job_Task_No_: Code[25];
            TaskDescription: Text;
            Job_Task_Type: Text;
            Task_Classification: Text;
            Customer_Work_Type: Text;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    Hi Abhinav,

    Please find the code for your reference.

  • Dynamics 365 Business Central Profile Picture
    700 on at

    I have chosen tables as dataitems.

  • Dynamics 365 Business Central Profile Picture
    700 on at

    Hi Abhinav,

    Did you get the error ?

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

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,449 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,431 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans