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;
                }
            }
        }
    }


  • 相关阅读:
    java 获取最近三个月的月初和月末日期
    java 字符串与十六进制互转
    @Validated 参数校验及配置
    mybatis 存取Oracle数据库中Blob类型数据
    Java下载服务器文件到前端
    Java实现Oracle拷贝数据插入到MySQL
    保利、绿地用移动质检3.0管进度、质量,让快周转又快又好!
    未造先知,匠心协同-BIM全过程总咨询实践案例赏析-2021版
    大数据资产管理总体框架概述
    “数据资产全生命周期管理”你要知道的九大问题
  • 原文地址:https://www.cnblogs.com/dingkui/p/14716029.html
Copyright © 2011-2022 走看看