Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
  • Expertise
    • Microsoft Dynamics 365
      • Finance and Operations
      • Customer Relationship Management
      • Customer Engagement
      • Business Central
      • Dynamics 365 Security Services
    • Microsoft Fabric
      • How to build data cortex
    • Cloud Solutions
      • Microsoft Azure
      • DevOps
    • Microsoft Power Platform
    • Security Services
      • Application Security
      • Cloud Security
      • Network Security
      • Red Team Assessment
    • Revenue Cycle Management
    • Salesforce
    • SAP
    • Application Development
  • Products
      Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Microsoft D365FO Connector for ADP Workforce Now
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • BarTender Connector for D365
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • ShipGuru
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • BBPTechnologies
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • LIS365
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • HSBC Connector for Microsoft D365FO
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Paycrypt365 Connector for Microsoft D365FO
  • Industries
      Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Healthcare
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Government
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Insurance
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Banking & Financial Services
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Manufacturing
    • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
    • Retail & E-Commerce
  • Company
    • About Us
    • Case Studies
    • Blogs
    • Careers
  • Contact Us
  • Staffing Solutions

Add Report Format to Print Management in D365

Muhammad Hammad

16July

In this article, we will look at how we can call our custom report using Print Management.

What is print management? Print management in D365 FO X++ is a powerful tool for managing and customizing your report designs. It provides a flexible way to control how your reports are printed and distributed.

Most of the time we would get the requirement to get the custom business document/report in the Print management form setup. To fulfil this requirement first of all we would create the design as we have created in our previous article. In this article we add our custom report design for the project invoice proposal format in the print management form setup. By default, there is the attached design in the setup if we go to the following path:

Project management and accounting -> Setup -> Forms -> Form setup -> Print Management -> Project invoice without billing rules ->

To add a custom design firstly we have to find the document type beyond that design, I have written a query below in SQL Server:


select * from PrintMgmtReportFormat
where name = 'PSAProjInvoice.Report'

                        

There are two different ways to call our custom design using print management form setup i.e., using event handler or chain of command

Using Event Handler

Step # 1: Copy the event handler of the getDefaultReportFormatDelegatemethod of the PrintMgmtDocTypeclass and subscribe to its event handler.

Step # 2: Create a new class and paste it. After it add logic in the method to call our custom report.


internal final class MDPrintMgmtDocTypeHandler
{
    [SubscribesTo(classStr(PrintMgmtDocType), delegateStr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
    public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
    {
        switch (_docType)
        {
            case PrintMgmtDocumentType::SIProjInvoice:
                _result.result(ssrsReportStr(MDPSAProjInvoice, Report));
                break;
        }
    }
}

                        

Using Chain of Command

Step # 1: We need to create COC of the addDocuments method of the PrintMgmtReportFormatPopulator class.


[ExtensionOf(classStr(PrintMgmtReportFormatPopulator))]
public final class MDPrintMgmtReportFormatPopulator_Extension
{
    protected void addDocuments()
    {
        #ISOCountryRegionCodes
        #PrintMgmtSetup

        next addDocuments();

        Add new customized document
        this.addOther(PrintMgmtDocumentType::SIProjInvoice, ssrsReportStr(MDPSAProjInvoice, Report), ssrsReportStr(MDPSAProjInvoice, Report), #NoCountryRegionId);
    }
}

                        

Result: After build and synchronize the solution, go to Project management and accounting -> Setup -> Forms -> Forms setup -> Print management -> Project invoice without billing rules:

Tags:
D365 Dynamics 365 Database Customization AX SSRS Reporting Report Chain of Command COC Delegate Event Handler Print Management Form Setup
Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner

GuruGroup recognizes the importance of staying up to date through frequent self-inventions. We achieve this by continually attracting the brightest minds in modern digital paradigms and platforms.

  • About Us
  • Products
  • Industries
  • Blogs
  • Contact Us
  • Careers
  • Support
Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner

104 S Woodburn Dr,
Dothan, AL 36305

Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner

Phone: +1 334 446-5235

Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner

Email: info@gurug.com

  • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
  • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
  • Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner Guru Group LLC - Cloud Consulting & IT Solutions Provider | Microsoft & Salesforce Partner
| GuruGroup
  • Terms & Conditions
  • Privacy Policy
  • AI Usage Policy
Ask Guru Group
Hi! 👋 How may I help you today?