销售出库明细报表新增自定义字段
1,900次浏览
编辑于2015年05月14日 18:52:54
总部大神,请指导
根据你们的插件示例,我做了以下配置
1、销售出库单上增加了一个自定义字段
2、重写了销售出库单的服务插件
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Kingdee.BOS.App.Data;
using Kingdee.BOS.Core.Report;
using Kingdee.BOS.Contracts;
using Kingdee.BOS.Util;
using Kingdee.K3.SCM.App.Sal.Report;
namespace Kingdee.K3.SCM.App.Sal.Report
{
public class CusSaleOutStockDetailRpt : SaleOutStockDetailRpt
{
private string[] customRptTempTableNames;
public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName)
{
IDBService dbservice = Kingdee.BOS.App.ServiceHelper.GetService
customRptTempTableNames = dbservice.CreateTemporaryTableName(this.Context, 1);
string strTable = customRptTempTableNames[0];
base.BuilderReportSqlAndTempTable(filter, strTable);
StringBuilder sb = new StringBuilder();
string strSql = "select t1.*,a1.F_ZC_ShouAmount into {0} from {1} t1 left join T_SAL_OUTSTOCKENTRY a1 on t1.fid=a1.fid and t1.fentryid=a1.Fentryid ";
sb.AppendFormat(strSql, tableName, strTable);
DBUtils.Execute(this.Context, sb.ToString());
}
public override void CloseReport()
{
if (customRptTempTableNames.IsNullOrEmptyOrWhiteSpace())
{
return;
}
IDBService dbservice = Kingdee.BOS.App.ServiceHelper.GetService
dbservice.DeleteTemporaryTableName(this.Context, customRptTempTableNames);
base.CloseReport();
}
}
}
3、注册了插件
4、在过滤框显示隐藏页签中增加了字段
5、在销售出库明细报表上增加了字段
6、在客户端上面没有显示该字段!!!
重启IIS,清除缓存都做了,为什么不显示!是不是前端显示也要写插件!请总部大神指导,谢谢!
推荐阅读