I have existing report which is Run from controller class SrsReportRunController.
I need to setup print management for this report.
Can anyone provide steps to achieve this in D365 FO.
Hi Guys found solution to this :
I had to include new custom report in Print management of specific module.
Step 1. We need to create new enum value in Base Enum PrintMgmtDocumentType.
Step 2. For each module we have class , in my case I needed to include custom report in WareHouse management so my class is WhsPrintMgmtNode_WHS which extends PrintMgmtNode.
This class is responsible to include new PrintMgmtdocumentype so I created extension of class:
[ExtensionOf(classStr(WhsPrintMgmtNode_WHS))]
final class WhsPrintMgmtNode_WHS_Extension
{
public List getDocumentTypes()
{
List docTypes = next getDocumentTypes();
docTypes.addEnd(PrintMgmtDocumentType::(Added Enum value in Step 1));
return docTypes;
}
}
By this step you are basically associating new Print mgmt node to Module.
Step 3. Now we need to associate our custom report for this new PrintMgmtDocumentType.
Need to subscribe to method getDefaultReportFormatDelegate of class PrintMgmtDocType
class PrintMgmtDocTypeEHSubscribe
{
/// <summary>
///
/// </summary>
/// <param name="_docType"></param>
/// <param name="_result"></param>
[SubscribesTo(classStr(PrintMgmtDocType), delegateStr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
{
switch (_docType)
{
case PrintMgmtDocumentType::(Added Enum value in Step 1):
_result.result(ssrsReportStr(Newreport, Reportdesign));
break;
}
}
Now If you build you will see New node added in Print management setup of your module with default report design ssrsReportStr(Newreport, Reportdesign)
Hope its helpfull.
Hi Wang,
Thanks for the links, but this links only tells us How to call new Report/Design for existing Print management report like in example adding new design to documenttype "Purchase order".
But how can i create this new documenttype itself for Particular module .
To start i have created new enumValyue in enum : PrintMgmtDocumentType.
Now i need to check how to make this available in particular module, later link this document type to my SSRS report so that i can use Print Management in my SSRS report.
Hi Goldie,
Please check this thread if it's helpful:
[View:https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/312257/how-to-setup-new-ssrs-report-in-print-management:750:50]