MSDyn365FO SSRS Extensions Part-1
Today I would like to talk a bit about SSRS reports extensions.
If you are developing a new SSRS report, it is 100% same as used to be in previous version AX2012. But when it comes to modification of existing reports, you have to follow the approach as per documentation. Whenever you have to extend a report in MSDyn365FO, 1ST thing that you should think of is following two points.
1) Is report output menu item linked to a controller class?
In case if the situation is #1 i.e. report output menu item is having a linked controller class, you have to analyse again following two points.
1-a) whether the report is based on print management? (Example sales confirmation etc.)
https://blogs.msdn.microsoft.com/dynamicsaxbi/2017/01/01/how-to-custom-designs-for-business-docs/
1-b) No report is NOT based on PRINT management. (Example item arrival journal print)
For both cases of 1-a OR 1-b, review the controller class. If controller class is returning object of controller anywhere in any of the methods..?
-
- If answer is Yes, create a post evet handler for that method and set the code to take your new report design. From here system will automatically pick up the new design as it will execute the standard controller class of the report. Please don’t forget to follow the process given in above URL(s)
- If the answer is NO, just following above links may not be enough. Assume the case 1-b for a report named wmsJournalTrans. Now the controller class of this report nowhere returns the object of controller. That means if you will create a post event handler for any methods of the controller class, you will get empty buffer/object, resulting in error message “Object reference not set to an instance of an object”. The reason is very simple. It is because, the controller class has no return point, hence post event handler cannot get object of base controller class and empty object results in error. To overcome such situation you have to do two steps.
1) Duplicate existing controller class and change design name of the report in controller class to your customized design.
2) Extend the standard output menu item and in the properties of the extended menu item specify your own controller class (that you have got as result of previous step)
2) Is report menu item NOT linked to controller class and directly report is being called using menu item?
If the standard report output menu item is not calling any controller class, you are in simplest situation with following steps to resolve it.
1) Extend the standard output menu item.
2) In the properties, specify the new report design rather than existing report design.
That’s it for now. I plan to record videos for each steps of reporting extensions in coming days, as I see lot of young lads face issues in this and ask questions on community, often.

Like
Report
*This post is locked for comments