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 :
Business Central forum

Wrong data displayed on report

(0) ShareShare
ReportReport
Posted on by 700

Hi All,

I have created report having filters from different tables. But, the report is showing correct data only when some particular combinations of filters are applied. Otherwise, incorrect results are displayed.

Can I know the reason behind it and possible solution too !

Thanks !

Categories:
I have the same question (0)
  • Dynamics 365 Business Central Profile Picture
    700 on at

    Please provide help, guys. It's urgent !

  • Suggested answer
    Suresh Kulla Profile Picture
    50,269 Super User 2026 Season 1 on at

    Please provide more details about what data it is showing and how you applied filters if possible send the screenshot of your code.

  • Dynamics 365 Business Central Profile Picture
    700 on at
    report 50103 EmployeeConfidentialInfoReport
    {
        Caption = 'Confidential Information';
        UsageCategory = ReportsAndAnalysis;
        ApplicationArea = All;
        DefaultLayout = RDLC;
        RDLCLayout = 'EmployeeConfidentialInfoReport.rdl';

        dataset
        {
            dataitem("Employee"; Employee)
            {
                RequestFilterHeading = ' ';
                RequestFilterFields = "Office Location", "status", "No.";


                column(No_; "No.")
                {
                }
                column(First_Name; "First Name")
                {
                }
                column(Last_Name; "Last Name")
                {
                    Caption = 'Surname';
                }
                column(Office_Location; "Office Location")
                {

                }

                // dataitem(EmploymentDetailsHeader; EmploymentDetailsHeader)
                // {

                //     RequestFilterHeading = ' ';
                //     RequestFilterFields = "EmployeeNo";
                //     //DataItemTableView = sorting();
                // }
                dataitem("Confidential Information"; "Confidential Information")
                {
                    RequestFilterHeading = ' ';
                    RequestFilterFields = "Confidential Code";
                    column(Confidential_Code; "Confidential Code")
                    {
                    }
                    column(Description; Description)
                    {
                    }
                }
            }
        }
    Above is the AL code for the report.
    CASE 1:
    pastedimage1568870797584v1.png
    As I have selected Employee No. as AH then the following report is generated
    pastedimage1568870849543v2.png
    Data is getting linked to same Employee 2 times
    CASE 2:
    pastedimage1568870976077v3.png
    pastedimage1568870991985v4.png
    I have created the confidential code '1' and Information only for employee AH but it is displayed for all employees
    NOTE: Two confidential codes have been created in the entire scenario '1' and '2', but for different employees. May be this is the reason why two records are displayed for the same employee.
    I hope you got the scenario now !
  • Dynamics 365 Business Central Profile Picture
    700 on at

    Suresh, sorry to interrupt, but can I please get the guidance quite early, if you don't mind ! I am unable to find any way actually.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    Hi,

    You should set DataItemLink Property for the indented Confidential Information Dataitem.

  • Dynamics 365 Business Central Profile Picture
    700 on at

    Did that too..

    dataitem("Confidential Information"; "Confidential Information")

               {

                   RequestFilterHeading = ' ';

                   RequestFilterFields = "Confidential Code";

                   DataItemLinkReference = Employee;

                   DataItemLink = "Employee No." = field ("No.");

    But in this case, when I enter only the Confidential Code in the reportrequest page. all employees are displayed.

    Although, it is working fine in case only Employee Code filter is applied.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    All Employees will be printed because its master dataitem in Report and confidential Information is child data item and you are putting filter on child data item , so first master data item will be processed without any filter after that child dataitem as per your provided filters.

    You make Confidential Information as master and Employee as child for the output you are expecting.

    Please check on Microsoft docs how the Report loop works.

  • Dynamics 365 Business Central Profile Picture
    700 on at

    I tried making Confidential Information as master and Employee as child. In this case, report is correctly filtered according to Employee No. but not according to Confidential Code.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans