Hello All,
I have developed a report from VS code and designed a simple RDLC layout to print output, but when I run my report the first row is correct according to the formula but the following rows are repeating/duplicating with the same values while values are expected to vary according to the transaction, can someone please guide me on how to prevent duplicates.
below is my code and report output
report 50100 CustLedgerEntry
{
UsageCategory = ReportsAndAnalysis;
ApplicationArea = all;
Caption = 'Customer vs Balance';
DefaultLayout = RDLC;
RDLCLayout = 'CustomerBalance.rdl';
dataset
{
dataitem("Cust. Ledger Entry"; "Cust. Ledger Entry")
{
RequestFilterFields = "Customer No.", "Posting Date";
column(Posting_Date; "Posting Date") { }
column(Document_Type; "Document Type") { }
column(Document_No_; "Document No.") { }
column(Description; Description) { }
dataitem(Customer; Customer)
{
DataItemLink = "No." = field("Customer No.");
column(No_; "No.") { }
column(Balance__LCY_; "Balance (LCY)") { }
column(Debit_Amount__LCY_; "Debit Amount (LCY)") { }
column(Credit_Amount__LCY_; "Credit Amount (LCY)") { }
column(BalanceTotal; BalanceTotal) { }
trigger OnAfterGetRecord()
begin
BalanceTotal := "Balance (LCY)" + ("Debit Amount (LCY)" - "Credit Amount (LCY)");
end;
}
}
}
var
Cust: Record Customer;
BalanceTotal: Decimal;
}
Thank you for your support