Report 703 Item Register - Quantity, source in 29
Source29
src/Layers/W1/BaseApp/Inventory/Reports/ItemRegisterQuantity.Report.al142 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.Inventory.Reports;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Ledger;
report 703 "Item Register - Quantity"
{
ApplicationArea = Basic, Suite;
Caption = 'Item Register - Quantity';
ToolTip = 'View one or more selected item registers showing quantity. The report can be used to document a register''s contents for internal or external audits.';
UsageCategory = ReportsAndAnalysis;
DefaultRenderingLayout = RDLCLayout;
dataset
{
dataitem("Item Register"; "Item Register")
{
DataItemTableView = sorting("No.");
PrintOnlyIfDetail = true;
RequestFilterFields = "No.";
column(CompanyName; COMPANYPROPERTY.DisplayName())
{
}
column(ItemRegFilterCopyText; TableCaption + ': ' + ItemRegFilter)
{
}
column(ItemRegFilter; ItemRegFilter)
{
}
column(No_ItemRegister; "No.")
{
}
column(ItemRegQtyCaption; ItemRegQtyCaptionLbl)
{
}
column(CurrReportPageNoCaption; CurrReportPageNoCaptionLbl)
{
}
column(PostingDateCaption; PostingDateCaptionLbl)
{
}
column(ItemDescriptionCaption; ItemDescriptionCaptionLbl)
{
}
column(No_ItemRegisterCaption; No_ItemRegisterCaptionLbl)
{
}
dataitem("Item Ledger Entry"; "Item Ledger Entry")
{
DataItemTableView = sorting("Entry No.");
column(PostingDate_ItemLedgEntry; Format("Posting Date"))
{
}
column(EntryType_ItemLedgEntry; "Entry Type")
{
IncludeCaption = true;
}
column(ItemNo_ItemLedgEntry; "Item No.")
{
IncludeCaption = true;
}
column(ItemDescription; ItemDescription)
{
}
column(Quantity_ItemLedgEntry; Quantity)
{
IncludeCaption = true;
}
column(EntryNo_ItemLedgEntry; "Entry No.")
{
IncludeCaption = true;
}
column(DocNo_ItemLedgEntry; "Document No.")
{
IncludeCaption = true;
}
trigger OnAfterGetRecord()
begin
ItemDescription := Description;
if ItemDescription = '' then begin
if not Item.Get("Item No.") then
Item.Init();
ItemDescription := Item.Description;
end;
end;
trigger OnPreDataItem()
begin
SetRange("Entry No.", "Item Register"."From Entry No.", "Item Register"."To Entry No.");
SetFilter("Item Register No.", '0|%1', "Item Register"."No.");
end;
}
}
}
requestpage
{
layout
{
}
actions
{
}
}
rendering
{
layout(RDLCLayout)
{
Type = RDLC;
LayoutFile = './Inventory/Reports/ItemRegisterQuantity.rdlc';
Summary = 'Report layout made in the legacy RDLC format. Use an RDLC editor to modify the layout.';
}
}
labels
{
}
trigger OnPreReport()
begin
ItemRegFilter := "Item Register".GetFilters();
end;
var
Item: Record Item;
ItemRegFilter: Text;
ItemDescription: Text[100];
ItemRegQtyCaptionLbl: Label 'Item Register - Quantity';
CurrReportPageNoCaptionLbl: Label 'Page';
PostingDateCaptionLbl: Label 'Posting Date';
ItemDescriptionCaptionLbl: Label 'Description';
No_ItemRegisterCaptionLbl: Label 'Register No.';
}