普通报表制作
错误详细堆栈信息:com.kingdee.bos.BOSException: Error sql: select sib.fnumber as sNumber, mater.fnumber as mNumber,mater.fName_L2 mName,mater.fmodel as model,unit.fDisplayName_L2 as unitName,sie.FQty as fqty,sie.FUnitStandardCost as price,sie.FStandardCost as money,sie.fworknumberid as workNumber,sie.fcarnumber as carNumber into VTZ7WEUWUZ100BGL8F8UD5Y6N9XNVEO3INL from T_IM_SaleIssueBill sib left join T_IM_SaleIssueEntry sie on sib.fid=sie.fparentId left join T_BD_material mater on sie.fmaterialId=mater.fid left join t_org_baseUnit unit on sie.fbaseunitid=unit.fid
去掉sql中 into VTZ7WEUWUZ100BGL8F8UD5Y6N9XNVEO3INL 运行一次,发现sql没有问题.
经过仔细一看,发现sql语句中没有预编译的字段"字段=?",而我在不小心的时候copy了一段代码:
executeCreateAsSelectInto(sb.toString(), new SqlParams().setString(1, cuId), ctx);
改为 executeCreateAsSelectInto(sb.toString(), null, ctx); 就ok了.