报表增加千分位显示

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:3

报表增加千分位显示

挂载报表表单插件即可

using Kingdee.BOS.Core.Report.PlugIn;

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Linq;

using System.Text;

using System.Threading.Tasks;


namespace HL.K3Cloud.PUS.ProductionWarehousingReport.Plugin

{

    [Description("客户详细分析表单插件-增加千分位")]

    public  class CustomerAnalysisBill: AbstractSysReportPlugIn

    {

        public override void FormatCellValue(Kingdee.BOS.Core.Report.PlugIn.Args.FormatCellValueArgs args)

        {

            base.FormatCellValue(args);


            List<String> strList = new List<string>() { "FAMOUNT", "FReturnAMOUNT", "FCostAmount_LC", "Fprofit", "FArrearsMoneny", "FNightStock", "FEightyStock", "FStock",  "FSingleAmount","FNightStockCount","FEightyStockCount"

                                                      ,"FSingleAmountAverage","FSheetAmount","FSheetAmountAverage","FHeterotypicAmount","FHeterotypicAmountAverage","FOtherAmount","FOtherAmountAverage","FStockCount"};

            if (strList.Contains(args.Header.Key))

            {

                decimal value = decimal.Parse(args.FormateValue);

                string afterValue = value.ToString("N3").TrimEnd('0').TrimEnd('.');

                args.FormateValue = afterValue;

            }

            //else if (args.Header.Key == "FAMOUNT" || args.Header.Key == "FSALCOSTPRICE" || args.Header.Key == "FPROFIT")

            //{

            //    decimal value = decimal.Parse(args.FormateValue);

            //    string afterValue = value.ToString("N");

            //    args.FormateValue = afterValue;

            //}

            //else if (args.Header.Key == "FPROFITRATE")

            //{

            //    decimal value = decimal.Parse(args.FormateValue);

            //    string afterValue = value.ToString("N4");

            //    args.FormateValue = afterValue;

            //}

        }

    }

}


报表增加千分位显示

挂载报表表单插件即可using Kingdee.BOS.Core.Report.PlugIn;using System;using System.Collections.Generic;using System.ComponentM...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息