report 90139 MyReport
{
Caption = 'Ledger Confirmation Report';
PreviewMode = PrintLayout;
UsageCategory = Administration;
ApplicationArea = All;
DefaultLayout = RDLC;
RDLCLayout = './Reports/LedgerConfirmationRepo.rdl';
dataset
{
dataitem(Customer_table; Customer)
{
RequestFilterFields = "No.";
column(OpeningBalance; OpeningBalance) { }
column(ClosingBalance; ClosingBalance) { }
dataitem(Cust_ledgerEntry; "Cust. Ledger Entry")
{
DataItemLink = "Customer No." = field("No.");
column(Debit_Amount; Cust_ledgerEntry."Debit Amount") { }
column(Credit_Amount; Cust_ledgerEntry."Credit Amount") { }
column(Date; Cust_ledgerEntry."Posting Date") { }
column(Particulars; Cust_ledgerEntry.Description) { }
}
trigger OnAfterGetRecord()
begin
CustLedgerEntry.Reset();
CustLedgerEntry.SetRange("Customer No.", "No.");
// CustLedgerEntry.SetFilter("Posting Date", '..%1', CalcDate('<-1D>', PostingDateFrom));
// CustLedgerEntry.CalcSums(Amount);
// OpeningBalance := CustLedgerEntry.Amount;
CustLedgerEntry.SetFilter("Posting Date", '%1..%2', PostingDateFrom, PostingDateTo);
CustLedgerEntry.CalcSums("Debit Amount", "Credit Amount");
DebitAmount := CustLedgerEntry."Debit Amount";
CreditAmount := CustLedgerEntry."Credit Amount";
ClosingBalance := OpeningBalance + DebitAmount - CreditAmount;
//C00050
end;
}
}
requestpage
{
SaveValues = true;
layout
{
area(content)
{
group(GroupName)
{
Caption = 'Date Filter';
field("Posting Date From"; "PostingDateFrom")
{
ApplicationArea = all;
Caption = 'Posting Date From';
ShowMandatory = true;
ToolTip = 'Specifies the date from you want the calculated for.';
}
field("Posting Date To"; "PostingDateTo")
{
ApplicationArea = all;
Caption = 'Posting Date To';
ShowMandatory = true;
ToolTip = 'Specifies the date to which you want the aging calculated for.';
}
}
}
}
}