最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Dynamics Ax 365 SSRS:如何为现有的打印管理报表调用新报表设计 / Dynamics Ax 365 SSRS: How to call new Report/Design for existing Print management report

网络文摘 William 1914浏览 0评论

Hi Dax guys,

I was working for a customer who was looking to implement custom designs on existing SSRS print management reports like purchase order confirmation report, for that requirement we created a new report with new design (Basically we copied the existing one and make changes to its design)

Now the problem was how to point print management framework to look for new report that we have designed.

Solution is :

Make a new extension class for example “hsPrintMgmtDelegatesHandler” for PrintMgmtDocType class on method getDefaultReportFormatDelegate and using that returns the custom report design name.

Complete code of extension class is given below.

 class hsPrintMgmtDelegatesHandler  
 {  
   /// <summary>  
   /// Delegate handler for the getDefaultReportFormatDelegate method of the <c>PrintMgmtDocType</c> class.  
   /// </summary>  
   /// <param name = "_docType"><c>PrintMgmtDocumentType</c> enumeration value.</param>  
   /// <param name = "_result">The <c>EventHandlerResult</c> object.</param>  
   [SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))]  
   public static void getDefaultReportFormatDelegateHandler(PrintMgmtDocumentType _docType, EventHandlerResult _result)  
   {  
     PrintMgmtReportFormatName formatName = hsPrintMgmtDelegatesHandler::getDefaultReportFormat(_docType);  
     if (formatName)  
     {  
       _result.result(formatName);  
     }  
   }  
   /// <summary>  
   /// Gets the report format value.  
   /// </summary>  
   /// <param name = "_docType">The <c>PrintMgmtDocumentType</c> enumeration value.</param>  
   /// <returns>The report format value.</returns>  
   private static PrintMgmtReportFormatName getDefaultReportFormat(PrintMgmtDocumentType _docType)  
   {  
     switch (_docType)  
     {  
       case PrintMgmtDocumentType::PurchaseOrderRequisition:  
         return ssrsReportStr(PurchPurchaseOrderCopy, Report);  
       case PrintMgmtDocumentType::PurchaseOrderConfirmationRequest:  
         return ssrsReportStr(PurchPurchaseOrderCopy, Report);  
     }  
     return '';  
   }  
 }  
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址