销售出库汇总表表增加销售组条件报错
金蝶云社区-原照越
原照越
0人赞赏了该文章 529次浏览 未经作者许可,禁止转载编辑于2016年09月03日 15:43:52


销售出库汇总表表增加销售组条件报错。分别增加显示隐藏列和分组汇总的销售组字段查询报表报错?什么问题


SELECT * INTO TMPB0E7581471A911E68103EB16763 FROM (SELECT FSETTLEORGID fsettleorgid, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fsaleorgid, MAX(FSALEORGNAME) fsaleorgname, MAX(FSETTLEORGNAME) fsettleorgname, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fdeptid, MAX(CONVERT(NVARCHAR(100), N' ')) fdeptnumber, MAX(CONVERT(NVARCHAR(100), N' ')) fdeptname, FCUSTOMERID fcustomerid, MAX(FCUSTOMERNUMBER) fcustomernumber, MAX(FCUSTOMERNAME) fcustomername, FMATERIALID fmaterialid, MAX(FMATERIALNUMBER) fmaterialnumber, MAX(FMATERIALNAME) fmaterialname, MAX(CONVERT(NVARCHAR(255), N' ')) fstockname, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fstocklocid, MAX(FSTOCKLOCNAME) fstocklocname, MAX(FLOT) flot, MAX(FMATERIALMODEL) fmaterialmodel, MAX(FUNITNAME) funitname, MAX(CONVERT(NVARCHAR(30), N' ')) funitname_base, MAX(FCURRENCYNAME) fcurrencyname, SUM(CASE WHEN (FOUTSTOCKQTY IS NULL) THEN 0.0 ELSE FOUTSTOCKQTY END) foutstockqty, SUM(CASE WHEN (FOUTSTOCKQTY_BASE IS NULL) THEN 0.0 ELSE FOUTSTOCKQTY_BASE END) foutstockqty_base, MAX(FOUTSTOCKPRICE) foutstockprice, MAX(FOUTSTOCKPRICE_TAX) foutstockprice_tax, SUM(CASE WHEN (FOUTSTOCKAMOUNT IS NULL) THEN 0.0 ELSE FOUTSTOCKAMOUNT END) foutstockamount, SUM(CASE WHEN (FOUTSTOCKAMOUNT_TAX IS NULL) THEN 0.0 ELSE FOUTSTOCKAMOUNT_TAX END) foutstockamount_tax, MAX(FOUTSTOCKCOST) foutstockcost, SUM(CASE WHEN (FOUTSTOCKTOTALCOST IS NULL) THEN 0.0 ELSE FOUTSTOCKTOTALCOST END) foutstocktotalcost, SUM(CASE WHEN (FRECQTY IS NULL) THEN 0.0 ELSE FRECQTY END) frecqty, SUM(CASE WHEN (FRECQTY_BASE IS NULL) THEN 0.0 ELSE FRECQTY_BASE END) frecqty_base, SUM(CASE WHEN (FRECAMOUNT IS NULL) THEN 0.0 ELSE FRECAMOUNT END) frecamount, SUM(CASE WHEN (FRECAMOUNT_TAX IS NULL) THEN 0.0 ELSE FRECAMOUNT_TAX END) frecamount_tax, SUM(CASE WHEN (FDIFFQTY IS NULL) THEN 0.0 ELSE FDIFFQTY END) fdiffqty, SUM(CASE WHEN (FDIFFQTY_BASE IS NULL) THEN 0.0 ELSE FDIFFQTY_BASE END) fdiffqty_base, SUM(CASE WHEN (FDIFFAMOUNT IS NULL) THEN 0.0 ELSE FDIFFAMOUNT END) fdiffamount, SUM(CASE WHEN (FDIFFAMOUNT_TAX IS NULL) THEN 0.0 ELSE FDIFFAMOUNT_TAX END) fdiffamount_tax, MAX(FPRICEPRECISION) fpriceprecision, MAX(FQTYPRECISION) fqtyprecision, MAX(FAMOUNTPRECISION) famountprecision, MAX(FCURRENCYID) fcurrencyid, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fbaseunitid, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fstockdeptid, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fstockorgid, MAX(CONVERT(NVARCHAR(100), N' ')) fsettletypename, MAX(CAST(CONVERT(FLOAT, 0) AS INT)) fsalerid, MAX(FSALERNAME) fsalername, FMATERIALGROUP fmaterialgroup, FERPCLSID ferpclsid, FCATEGORYID fcategoryid, MAX(FMATERIALGROUPNAME) fmaterialgroupname, MAX(FCATEGORYIDNAME) fcategoryidname, MAX(FMATERIALAUXID) fmaterialauxid, MAX(FMATERIALAUXNAME) fmaterialauxname FROM TMPB0E7581371A911E68103EB16763 WHERE 1 = 1 GROUP BY FSETTLEORGID, FCUSTOMERID, F_PAEZ_Base, FMATERIALID, FMATERIALGROUP, FERPCLSID, FCATEGORYID, FLot) agt

Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL, IEnumerable`1 paramList, Boolean needTranslate)
在 Kingdee.BOS.App.Data.DBUtils.Execute(Context ctx, String strSQL)

Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.IDBService.Execute(Context ctx, String strSQL)
在 Kingdee.K3.SCM.App.Sal.Report.SaleOutStockSummaryRpt.BuilderReportSqlAndTempTable(IRptParams filter, String tableName)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.CreateTempTable(IRptParams filter, String tablename)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetDataForVirtual(IRptParams filter)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetData(IRptParams filter)
在 Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.App.Core.SysReportService.GetReportData(ReportServiceParameter parameter)

Exception rethrown at [1]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISysReportService.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.Model.Report.SysReportModel.GetData(Int32 start, Int32 rows)
在 Kingdee.BOS.Web.Report.SysReportView.GetListData()
在 Kingdee.BOS.Web.Report.SysReportView.<>c__DisplayClass4d.b__49()