Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Help with RDLC Report - getting 0 value for Amount in the Customer Ledger Entry dataitem aftergetrecord event

Posted on by 5,124

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

  • mbr Profile Picture
    mbr 5,124 on at
    RE: Help with RDLC Report - getting 0 value for Amount in the Customer Ledger Entry dataitem aftergetrecord event

    thanks MMV.  I just didn't use calcfields properly.  it needed to be inside my repeat loop. :)

  • mbr Profile Picture
    mbr 5,124 on at
    RE: Help with RDLC Report - getting 0 value for Amount in the Customer Ledger Entry dataitem aftergetrecord event

    HI Suresh,

    OMG! I realized my mistake.  I knew it's because AMount is a formfield.....and used Calcfields.....but I didn't put calcfields in the correct line.  It needs to be inside the repeat loop.  LOL! Newbie still....'didn't fully understand calcfields until now. :)  Anyway, all is well now.  I transferred the calcfields method inside the repeat loop and I am now seeing the values for the amount formfield. :)  Thankyoumuch.

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Help with RDLC Report - getting 0 value for Amount in the Customer Ledger Entry dataitem aftergetrecord event

    Hi,

    As mentioned by Suresh, you need to use the CALCFIELDS to calculate the "Amount (LCY", because it's a flowfield.

    Best Regards,

    MMV

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Help with RDLC Report - getting 0 value for Amount in the Customer Ledger Entry dataitem aftergetrecord event

    This is very strange if you get entry no. and posting date but not the amount value.  You have to use CALCFIELDS since it is a flowfield, can you please filter the detail ledger entries table for that entry no. i.e. (Cust. ledger Entry No.) field on the table and sum up the value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans