Report 99000762 Prod. Order - Job Card, source in 29
Source29
src/Layers/W1/BaseApp/Manufacturing/Document/ProdOrderJobCard.Report.al241 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Manufacturing.Document;
using Microsoft.Manufacturing.Capacity;
using Microsoft.Manufacturing.WorkCenter;
using System.Utilities;
report 99000762 "Prod. Order - Job Card"
{
AdditionalSearchTerms = 'production order - job card,work order job card';
ApplicationArea = Manufacturing;
Caption = 'Prod. Order - Job Card';
ToolTip = 'View a list of the work in progress of a production order. Output, Scrapped Quantity and Production Lead Time are shown or printed depending on the operation.';
UsageCategory = ReportsAndAnalysis;
WordMergeDataItem = "Production Order";
DefaultRenderingLayout = RDLCLayout;
dataset
{
dataitem("Production Order"; "Production Order")
{
DataItemTableView = sorting(Status, "No.");
RequestFilterFields = Status, "No.", "Source Type", "Source No.";
column(Status_ProdOrder; Status)
{
}
column(No_ProdOrder; "No.")
{
}
dataitem("Integer"; "Integer")
{
DataItemTableView = sorting(Number) where(Number = const(1));
column(TodayFormatted; Format(Today, 0, 4))
{
}
column(CompanyName; COMPANYPROPERTY.DisplayName())
{
}
column(ProdOrderTableCaptionFilt; "Production Order".TableCaption + ':' + ProdOrderFilter)
{
}
column(ProdOrderFilter; ProdOrderFilter)
{
}
column(CurrReportPageNoCaption; CurrReportPageNoCaptionLbl)
{
}
column(ProdOrderJobCardCaption; ProdOrderJobCardCaptionLbl)
{
}
}
dataitem("Prod. Order Routing Line"; "Prod. Order Routing Line")
{
DataItemLink = Status = field(Status), "Prod. Order No." = field("No.");
DataItemTableView = sorting(Status, "Prod. Order No.", "Routing Reference No.", "Routing No.", "Operation No.");
column(RtngNo_ProdOrderRtngLine; "Routing No.")
{
IncludeCaption = true;
}
column(OPNo_ProdOrderRtngLine; "Operation No.")
{
IncludeCaption = true;
}
column(Type_ProdOrderRtngLine; Type)
{
IncludeCaption = true;
}
column(No_ProdOrderRtngLine; "No.")
{
IncludeCaption = true;
}
column(StrtTim_ProdOrderRtngLine; "Starting Time")
{
IncludeCaption = true;
}
column(StrtDt_ProdOrderRtngLine; Format("Starting Date"))
{
}
column(EndTime_ProdOrderRtngLine; "Ending Time")
{
IncludeCaption = true;
}
column(EndDate_ProdOrderRtngLine; Format("Ending Date"))
{
}
column(ExpCapNd_ProdOrderRtngLine; "Expected Capacity Need")
{
}
column(Desc_ProdOrder; "Production Order".Description)
{
}
column(SourceNo_ProdOrder; "Production Order"."Source No.")
{
}
column(ProdOrdrRtngLineRTUOMCode; CapacityUoM)
{
}
column(PrdOrdNo_ProdOrderRtngLine; "Prod. Order No.")
{
IncludeCaption = true;
}
column(ProdOrderRtngLnStrtDtCapt; ProdOrderRtngLnStrtDtCaptLbl)
{
}
column(ProdOrdRtngLnEndDatCapt; ProdOrdRtngLnEndDatCaptLbl)
{
}
column(ProdOrdRtngLnExpcCapNdCpt; ProdOrdRtngLnExpcCapNdCptLbl)
{
}
column(PrecalcTimesCaption; PrecalcTimesCaptionLbl)
{
}
column(ProdOrderSourceNoCapt; ProdOrderSourceNoCaptLbl)
{
}
column(OutputCaption; OutputCaptionLbl)
{
}
column(ScrapCaption; ScrapCaptionLbl)
{
}
column(DateCaption; DateCaptionLbl)
{
}
column(ByCaption; ByCaptionLbl)
{
}
column(EmptyStringCaption; EmptyStringCaptionLbl)
{
}
dataitem("Prod. Order Component"; "Prod. Order Component")
{
DataItemLink = Status = field(Status), "Prod. Order No." = field("Prod. Order No."), "Routing Link Code" = field("Routing Link Code");
DataItemTableView = sorting(Status, "Prod. Order No.", "Prod. Order Line No.", "Line No.");
column(Position_ProdOrderComp; Position)
{
IncludeCaption = true;
}
column(Position2_ProdOrderComp; "Position 2")
{
IncludeCaption = true;
}
column(LdTimOffset_ProdOrderComp; "Lead-Time Offset")
{
IncludeCaption = true;
}
column(ExpectedQty_ProdOrderComp; "Expected Quantity")
{
IncludeCaption = true;
}
column(ItemNo_ProdOrderComp; "Item No.")
{
IncludeCaption = true;
}
column(OrderNo_ProdOrderComp; "Prod. Order No.")
{
}
column(MaterialRequirementsCapt; MaterialRequirementsCaptLbl)
{
}
}
trigger OnAfterGetRecord()
var
WorkCenter: Record "Work Center";
CalendarMgt: Codeunit "Shop Calendar Management";
begin
WorkCenter.Get("Work Center No.");
CapacityUoM := WorkCenter."Unit of Measure Code";
"Expected Capacity Need" := "Expected Capacity Need" / CalendarMgt.TimeFactor(CapacityUoM);
end;
}
trigger OnAfterGetRecord()
var
ProdOrderRoutingLine: Record "Prod. Order Routing Line";
begin
ProdOrderRoutingLine.SetRange(Status, Status);
ProdOrderRoutingLine.SetRange("Prod. Order No.", "No.");
if not ProdOrderRoutingLine.FindFirst() then
CurrReport.Skip();
end;
trigger OnPreDataItem()
begin
ProdOrderFilter := GetFilters();
end;
}
}
requestpage
{
AboutTitle = 'About Prod. Order - Job Card';
AboutText = 'Details out the components and capacity required to fulfil a Production Order. Use it to provide a printable report that your team can use to execute the manufacturing job.';
layout
{
}
actions
{
}
}
rendering
{
layout(RDLCLayout)
{
Type = RDLC;
LayoutFile = './Manufacturing/Document/ProdOrderJobCard.rdlc';
Summary = 'Report layout made in the legacy RDLC format. Use an RDLC editor to modify the layout.';
}
}
labels
{
}
var
ProdOrderFilter: Text;
CapacityUoM: Code[10];
CurrReportPageNoCaptionLbl: Label 'Page';
ProdOrderJobCardCaptionLbl: Label 'Prod. Order - Job Card';
ProdOrderRtngLnStrtDtCaptLbl: Label 'Starting Date';
ProdOrdRtngLnEndDatCaptLbl: Label 'Ending Date';
ProdOrdRtngLnExpcCapNdCptLbl: Label 'Time Needed';
PrecalcTimesCaptionLbl: Label 'Precalc. Times';
ProdOrderSourceNoCaptLbl: Label 'Item No.';
OutputCaptionLbl: Label 'Output';
ScrapCaptionLbl: Label 'Scrap';
DateCaptionLbl: Label 'Date';
ByCaptionLbl: Label 'By';
EmptyStringCaptionLbl: Label '___________';
MaterialRequirementsCaptLbl: Label 'Material Requirements';
}