web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Event Handler not executing in SSRS report in D365FO

(1) ShareShare
ReportReport
Posted on by 501
I did a customization on a report by adding a field, and I did a event handler class that should execute on inserting in the tmp table, so I can fill this field that I added.
 
Unfortunately, even the field is empty because the event handler code is not executing, anyone knows why?
 
Categories:
I have the same question (0)
  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi,
     
    Is this a report based on query or RDP?
     
    And can you put the break point on line 6 instead please? And try to debug again
     
     
  • CU09091357-0 Profile Picture
    501 on at
    Layan Jwei thank you for your response.
     
    It's an RDP based report.
     
    Probably the event handler (onInserting) is not executing because the main DP class is inserting into tmp table through insert_recordset method.
     
    Any idea how can we trigger this event?
  • Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi,
     
    What's the name of the report you did a customization for?
     
    Yes if it's an RDP, then inserting to the tmp table needs to be handled in the DP class.
  • Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at
    By the way, there is a bug in your code. You iterate BankAccountTrans records, but you keep overwriting the same value. You effectively take the value from the last record and loading all the previous ones is just a waste of resources.
     
    If you really want the last one, remove the while loop and use just a normal select statement with firstOnly keyword. Also, add an order by clause, because which record is the last depends on sorting. Your current code leaves the decision on the DB server.
     
    Or maybe you wanted to take all records into account but you didn't add the necessary logic.
  • CU09091357-0 Profile Picture
    501 on at
    Layan Jwei it's the bankAccountStatement report
  • CU09091357-0 Profile Picture
    501 on at
    Martin Dráb I want to fill each record by its right description column value.
     
     
  • Verified answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
     Hi,
     
    Try to add your code in processReport method of your report's RDP class using COC extension or use the 
     post handler event method of processReport(), as in the following link:
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans