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';
}