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

Error in displaying report data

(0) ShareShare
ReportReport
Posted on by 700

Hi All,

Whenever I am trying to preview the below report, no content is getting displayed, only column names are being displayed. Could anyone please tell me if there is any error in the code ?

Thanks !

CODE:-

report 50108 EmployeeAllReport
{
    Caption = 'All';
    UsageCategory = ReportsAndAnalysis;
    ApplicationArea = All;
    DefaultLayout = RDLC;
    RDLCLayout = 'EmployeeAllReport.rdl';

    dataset
    {
        dataitem(Employee1; Employee)
        {
            // RequestFilterHeading = ' ';
            RequestFilterFields = "Office Location", "status", "Department", "Job Title";
            // DataItemTableView = sorting ("No.");
            PrintOnlyIfDetail = true;

            dataitem("EmploymentDetailsHeader"; EmploymentDetailsHeader)
            {
                //DataItemLinkReference = Employee1;
                DataItemLink = EmployeeNo = field ("No.");

                RequestFilterFields = "EmploymentType";


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

                }
                column(EmpFirstName; EmpFirstName)
                {

                }
                column(EmpLastName; EmpLastName)
                {

                }
                column(Birthdate; format(Birthdate))
                {

                }
                column(JobTitle; JobTitle)
                {

                }
                column(CivilStatus; Employee1."Civil Status")
                {

                }
                column(Gender; Employee1.Gender)
                {

                }
                column(EthicGroup; Employee1."Ethic Group")
                {

                }
                column(BloodGroup; Employee1."Blood Group")
                {

                }
                column(IdentificationType; Employee1."Identification Type")
                {

                }
                column(IdentificationNo; IdentificationNo)
                {

                }
                column(Nationality; Nationality)
                {

                }
                column(EmploymentDate; format(EmploymentDate))
                {

                }
                column(Department; Department)
                {

                }
                column(BGVCompleted; Employee1."BGV completed")
                {

                }
                column(OfficeLocation; Employee1."Office Location")
                {

                }
                column(NoOfDependents; NoOfDependents)
                {

                }
                column(EmploymentType; EmploymentType)
                {

                }
                column(TerminationDate; format(TerminationDate))
                {

                }
                column(GroundsForTermCode; GroundsForTermCode)
                {

                }
                column(Tenure_In_Months; Tenure_In_Months)
                {

                }
                column(EmployeeFilter; EmployeeFilter)
                {

                }
                column(EmploymentDetailsHeaderFilter; EmploymentDetailsHeaderFilter)
                {

                }

                trigger OnPreDataItem()
                var
                    myInt: Integer;
                begin
                    EmployeeFilter := Employee.GetFilters;
                    EmploymentDetailsHeaderFilter := EmploymentDetailsHeader.GetFilters;
                end;

                trigger OnAfterGetRecord()
                begin
                    //Clear(EmpNo);
                    Clear(Title);
                    Clear(EmpFirstName);
                    Clear(EmpLastName);
                    Clear(Birthdate);
                    clear(JobTitle);
                    Clear(CivilStatus);
                    Clear(gender);
                    Clear(EthicGroup);
                    Clear(BloodGroup);
                    Clear(IdentificationType);
                    Clear(IdentificationNo);
                    Clear(Nationality);
                    Clear(EmploymentDate);
                    Clear(Department);
                    Clear(BGVCompleted);
                    Clear(OfficeLocation);
                    Clear(NoOfDependents);

                    if Employee.Get(No) then begin
                        // EmpNo := Employee1."No.";
                        EmpFirstName := Employee."First Name";
                        EmpLastName := Employee."Last Name";
                        Birthdate := Employee."Birth Date";
                        JobTitle := Employee."Job Title";
                        CivilStatus := Employee."Civil Status";
                        gender := Employee.Gender;
                        EthicGroup := Employee."Ethic Group";
                        BloodGroup := Employee."Blood Group";
                        IdentificationType := Employee."Identification Type";
                        IdentificationNo := Employee."Identification number";
                        Nationality := Employee.Nationality;
                        EmploymentDate := Employee."Employment Date";
                        Department := Employee.Department;
                        BGVCompleted := Employee."BGV completed";
                        OfficeLocation := Employee."Office Location";
                        NoOfDependents := Employee."Number of Dependants";
                    end;

                end;

            }
        }
    }

    requestpage
    {
        layout
        {

        }

        trigger Onopenpage()  //sets default value for the Status filter as 'Active'
        var
            myInt: Integer;
        begin
            Employee.SetRange(Status, Employee.Status::Active);
        end;

    }


    // requestpage
    // {
    //     layout
    //     {
    //         area(Content)
    //         {
    //             group(GroupName)
    //             {
    //                  field(Name; SourceExpression)
    //                  {
    //                      ApplicationArea = All;

    //                 // }
    //             }
    //         }
    //     }

    //     actions
    //     {
    //         area(processing)
    //         {
    //             action(ActionName)
    //             {
    //                 ApplicationArea = All;

    //             }
    //         }
    //     }
    // }



    var
        CurrReport_PAGENOCaptionLbl: Label 'Page';
        myInt: Integer;
        Employee: Record Employee;
        EmpNo: Code[20];
        Title: Text;
        EmpFirstName: Text;
        EmpLastName: Text;
        Birthdate: Date;
        JobTitle: Text;
        CivilStatus: Option;
        gender: Option;
        EthicGroup: Option;
        BloodGroup: Option;
        IdentificationType: Option;
        IdentificationNo: Text;
        Nationality: Text;
        EmploymentDate: Date;
        Department: Option;
        BGVCompleted: Option;
        OfficeLocation: Option;                        //Code[20];
        NoOfDependents: Integer;
        EmployeeFilter: Text;
        EmploymentDetailsHeaderFilter: Text;


}
Categories:
  • Suggested answer
    Community Member Profile Picture
    on at

    Set printonly details property to "No" And check

  • Dynamics 365 Business Central Profile Picture
    700 on at

    Tried that, still not working

  • Dynamics 365 Business Central Profile Picture
    700 on at

    Please respond

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