[D365] How to add a custom report type to print management setup X++

The simple way to add new report or new design of existing report in Print management

Step-1 Create new class SLD_DemoSample

image

Step-2 Find class PrintMgmtDocType in Application Explore and open in designer

image

Step-3 find the delegate in PrintMgmtDocType class  Delegate name is  getDefaultReportFormatDelegate

image

Step-4 Subscribe the event of above highlighted event in the newly created class

image

Step-5 Now add the your report design in the EventHandlerResult _result

///
///
///
///
///
    [SubscribesTo(classStr(PrintMgmtDocType), delegateStr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
{
        if(PrintMgmtDocumentType::CustInterestNote==_docType)
{
_result.result(ssrsReportStr(SLD_BinCart,Report));

}

}

Step-6 Perform build and sync and verify on D365FO

Leave Comment

Your email address will not be published. Required fields are marked *