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

Announcements

News and Announcements icon
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 600
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,282 Super User 2026 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
    600 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,282 Super User 2026 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
    240,492 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
    600 on at
    Layan Jwei it's the bankAccountStatement report
  • CU09091357-0 Profile Picture
    600 on at
    Martin Dráb I want to fill each record by its right description column value.
     
     
  • Verified answer
    Waed Ayyad Profile Picture
    9,214 Super User 2026 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
SajeedMullaji Profile Picture

SajeedMullaji 760

#2
Martin Dráb Profile Picture

Martin Dráb 330 Most Valuable Professional

#3
CU10121822-0 Profile Picture

CU10121822-0 310

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans