{"id":524,"date":"2019-07-12T14:13:25","date_gmt":"2019-07-12T12:13:25","guid":{"rendered":"http:\/\/daxvisionerp.com\/?p=524"},"modified":"2025-10-27T08:20:10","modified_gmt":"2025-10-27T08:20:10","slug":"extending-a-report-in-msdyn365fo","status":"publish","type":"post","link":"https:\/\/daxvisionerp.com\/home\/extending-a-report-in-msdyn365fo\/","title":{"rendered":"Reports in Dynamics 365FO"},"content":{"rendered":"\n<p class=\"has-text-align-left\">Creating our own report remains the same as it was in the 2012 version.<br> However, modifying existing reports changed quite a bit. You can\u2019t actually create an extension of a report, but you can duplicate and then modify it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Extending a report<\/strong><\/h3>\n\n\n\n<p class=\"has-medium-font-size\">If the report\u2019s output menu item is linked to a controller class<\/p>\n\n\n\n<p style=\"font-size:18px\">If the controller class returns a controller object <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Construct.jpg\" alt=\"\" class=\"wp-image-550\"\/><\/figure>\n\n\n\n<p>You have to create a post event handler for this construct() method, and modify the parmReportName in order to get the desired report design.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Handler.jpg\" alt=\"\" class=\"wp-image-535\"\/><\/figure>\n\n\n\n<p style=\"font-size:18px\">If the controller class <strong>doesn\u2019t<\/strong> return a controller object <\/p>\n\n\n\n<p>Duplicate the class and change the name of the design to the one you want to display.<br>Extend the output menu item of the report, and enter the name of the controller\u2019s class to the \u2018Object\u2019 property. <\/p>\n\n\n\n<p style=\"font-size:18px\"><strong>Print Management<\/strong> <\/p>\n\n\n\n<p style=\"font-size:18px\">If the report is based on Print Management (e.g. SalesConfirm) <\/p>\n\n\n\n<p>The report\u2019s controller class contains PrintMgmt methods.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/PrintMgmt.jpg\" alt=\"\" class=\"wp-image-537\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/dynamicsaxbi\/2017\/01\/01\/how-to-custom-designs-for-business-docs\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blogs.msdn.microsoft.com\/dynamicsaxbi\/2017\/01\/01\/how-to-custom-designs-for-business-docs\/<\/a>\/ <br><\/p>\n\n\n\n<p style=\"font-size:18px\">If the report is <strong>not<\/strong> based on Print Management <\/p>\n\n\n\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/dynamicsaxbi\/2016\/12\/27\/how-to-expanding-app-suite-report-data-sets\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blogs.msdn.microsoft.com\/dynamicsaxbi\/2016\/12\/27\/how-to-expanding-app-suite-report-data-sets\/<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size\">If the report\u2019s output menu item is not linked to a controller class, and the report gets called directly by the menu item (e.g. smmActivityAnalyses)<\/p>\n\n\n\n<p>Extend the output menu item.<br>Change the \u201cReport Design\u201d property to your report design\u2019s name. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Report design<\/h3>\n\n\n\n<p>Designing reports remained exactly the same as it was in the previous version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<p style=\"font-size:18px\">Extending the CustInvoiceJour report with an additional field.<\/p>\n\n\n\n<p>Create a new project in a model, that references the Application Suite, because that\u2019s what the CustInvoiceJour\u2019s base model is.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Models.jpg\" alt=\"\" class=\"wp-image-539\"\/><\/figure>\n\n\n\n<p>Extend the CustInvoiceJourTmp table and add the field to the Fields folder.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Fields.jpg\" alt=\"\" class=\"wp-image-541\"\/><\/figure>\n\n\n\n<p>Duplicate the CustInvoiceJour report. You can rename it by right click and \u2018Rename\u2019.<\/p>\n\n\n\n<p>You can either modify the default report design, or you can duplicate it and then modify that one.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Designs.jpg\" alt=\"\" class=\"wp-image-542\"\/><\/figure>\n\n\n\n<p>Duplicate the CustInvoiceJourController class, rename it to something like CustInvoiceJourControllerExt and insert your design\u2019s name.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Design_Name.jpg\" alt=\"\" class=\"wp-image-543\"\/><\/figure>\n\n\n\n<p>Duplicate the CustInvoiceJourDP class and add value to your new field.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Field_Value-2.jpg\" alt=\"\" class=\"wp-image-549\"\/><\/figure>\n\n\n\n<p>Change the report dataset\u2019s query to the new DP class.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Query.jpg\" alt=\"\" class=\"wp-image-545\"\/><\/figure>\n\n\n\n<p>Extend the CustInvoiceJourReport output menu item and add the name of your controller class to the \u2018Object\u2019 property. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Properties.jpg\" alt=\"\" class=\"wp-image-546\"\/><\/figure>\n\n\n\n<p>You can also set this menu item as Startup Object, so that when you run the project, this will be opened automatically.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"http:\/\/daxvisionerp.com\/wp-content\/uploads\/2019\/07\/Startup_Object.jpg\" alt=\"\" class=\"wp-image-547\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Source<\/h3>\n\n\n\n<p>Most of the information came from Sohaib Cheema&#8217;s topic about reports.<br><br><a href=\"https:\/\/community.dynamics.com\/365\/financeandoperations\/b\/microsoftdynamicsaxextensions\/archive\/2018\/05\/18\/msdyn365fo-ssrs-extensions-part-1\" target=\"_blank\" rel=\"noopener\">https:\/\/community.dynamics.com\/365\/financeandoperations\/b\/microsoftdynamicsaxextensions\/archive\/2018\/05\/18\/msdyn365fo-ssrs-extensions-part-1<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n<div class=\"taxonomy-post_tag wp-block-post-terms\"><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/msdyn365fo\/\" rel=\"tag\">#MSDyn365FO<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/extending-a-report\/\" rel=\"tag\">extending a report<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/extension\/\" rel=\"tag\">extension<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/report-development\/\" rel=\"tag\">Report development<\/a><span class=\"wp-block-post-terms__separator\">, <\/span><a href=\"https:\/\/daxvisionerp.com\/home\/tag\/reports\/\" rel=\"tag\">Reports<\/a><\/div>\n\n\n<p><br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating our own report remains the same as it was in the 2012 version. However, modifying existing reports changed quite a bit. You can\u2019t actually create an extension of a report, but you can duplicate and then modify it. Extending a report If the report\u2019s output menu item is linked to a controller class If [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[19,1],"tags":[25,45,47,49,51],"class_list":["post-524","post","type-post","status-publish","format-standard","hentry","category-dynamics-365fo","category-uncategorized","tag-msdyn365fo","tag-extending-a-report","tag-extension","tag-report-development","tag-reports"],"_links":{"self":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":1,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"predecessor-version":[{"id":1396,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/posts\/524\/revisions\/1396"}],"wp:attachment":[{"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daxvisionerp.com\/home\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}