I need help! I am stuck with this report! :( Basically, this RDLC report has two tables: SalesPerson/Purchaser and Customer Ledger Entry. I want to list all Sales Persons. He primary group is Sales PErson Code. Within the Sales Person Code, I link the dataitem=Customer Ledger Entry where Sales Person Code=Customer Ledger Entry.Sales Person Code,DocumentType = Payment or Refund and Posting Date in CUstomer Ledger Entry within the date filter (specified in the Request Page). Under the Sales Person Code, I want to Group by Customer Sell To No. So basically, you will have Sales Person Code in the first line, then Customer Sell To No. in the second line. hen Under Customer Sell To No, another group by Posting Date. In the same Line as Posting Date, I want to display the sum("Amount (LCY)") so it shows total Amount for that Posting Date. Then under the Dataitem Customer Ledger Entry, add another Dataitem link to Customer Ledger Entry and name it Applied Entries where Applied Entries.ClosedbyEntryNo=Field(EntryNo). In the Report, I will show the details of Applied Entries under the Posting Date Grouping.
So everything looks like it's working in the Report whereby I see this:
Sales Person-John Smith
Customer: ABC
Posting Date: 9/12/14 Payment: 0 (this is not accurate)
Details:
EntryNo Document No ClosedByAmt
343 Invoice $333
333 Invoice $444
The problem is I can't seem to calculate the Total Payment in the Posting Date Grouping. I keep getting 0s. When I tried to calculate the total payment in the Customer Ledger Entry After Get Record even in the C/AL, I get Amount (LCY)=0 even though it gives me the correct posting date and correct entry no. The decimal values keep displaying as 0s. I tried the calcfields("Amount (LCY)") or even calcfields(Amount) but I still get 0 value. It really is puzzling why I get 0s when querying against Customer Ledger Entry in the aftergetrecord event of Customer LEdger Entry Dataitem. Am I missing something?
*This post is locked for comments