zoukankan      html  css  js  c++  java
  • D365 增加新的报表格式代替标准报表

    D365 增加新的报表格式代替标准报表

    1: 增加客制化报表格式到打印管理

    [ExtensionOf(classStr(PrintMgmtReportFormatPopulator))]
    public final class PrintMgmtReportFormatPopulatorAppSuite_myClass_Extension
    {
        #ISOCountryRegionCodes
        #PrintMgmtSetup
    
        protected void addDocuments()
        {
            // Purchasing documents
            this.myAddPurchaseDocuments();
    
            next addDocuments();
        }
    
        ///
        /// Adds purchase records to the PrintMgmtReportFormat table.
        ///
        public void myAddPurchaseDocuments()
        {
            this.addOther(PrintMgmtDocumentType::PurchAgreementConfirmation, ssrsReportStr(myPurchPromptLetterReport, Report), ssrsReportStr(myPurchPromptLetterReport, Report), #NoCountryRegionId);
            this.addOther(PrintMgmtDocumentType::PurchAgreementConfirmation, ssrsReportStr(mySecondPurchPromptLetterReport, Report), ssrsReportStr(mySecondPurchPromptLetterReport, Report), #NoCountryRegionId);
        }
    
    }

    2:扩展PrintMgmtDelegatesHandler的getDefaultReportFormatDelegateHandler方法

    final class PrintMgmtDelegatesHandlerKKC_Extension
    {
        public static void getDefaultReportFormatDelegateHandler(PrintMgmtDocumentType _docType, EventHandlerResult _result)
        {
            next getDefaultReportFormatDelegateHandler(_docType, _result);
            
            if (_docType == PrintMgmtDocumentType::PurchaseOrderConfirmationRequest
            ||  _docType == PrintMgmtDocumentType::PurchaseOrderRequisition)
            {
                PrintMgmtDocInstance    printMgmtDocInstance    = PrintMgmtDocInstance::findByPrintType(0,0,PrintMgmtNodeType::Purch,PrintMgmtDocumentType::PurchaseOrderRequisition,PrintMgmtDocInstanceType::Original);
                PrintMgmtSettings       printMgmtSettings       = PrintMgmtSettings::find(printMgmtDocInstance.RecId,printMgmtDocInstance.PriorityId,true);
                PrintMgmtReportFormat   poPrintMgmtReportFormat = PrintMgmtReportFormat::find(printMgmtSettings.ReportFormat);
                switch (poPrintMgmtReportFormat.Name)
                {
                    case ssrsReportStr(PurchPurchaseOrder, MyReport):
                        _result.result(ssrsReportStr(PurchPurchaseOrder, MyReport));
                        break;
                }
            }
        }
    }


  • 相关阅读:
    物流能力和综合层次结构
    new Eclipse 3.0+Lomboz 3.0+Tomcat 5.0.16配置
    30件你不知道可以通过Internet来办到的事
    《网上苏州》电子地图建设方案
    IT从业人员必看的10个论坛
    非常在线网站站长自述创业经历
    防止对 Visual Basic .NET 或 C# 代码进行反相工程
    略论中国人的思维方式
    C# vs. Java:相反的思维方式 (译文)
    Java多线程编程经验谈
  • 原文地址:https://www.cnblogs.com/dingkui/p/14716029.html
Copyright © 2011-2022 走看看