自定义关键字,@DepartNumber@,部门编码,字符串,数据来源:部门,字段:代码,允许录入,必录
在报表 进入界面 过滤窗中,点击部门编码的查询,(查不到数据)
跟踪得到查询代码
SELECT * FROM (SELECT t0.FNUMBER fnumber, t0.FHELPCODE fhelpcode, t0_L.FNAME fname, t0.FPARENTID fparentid_id, t0.FISHRDEPT fishrdept, t0.FISSHR fisshr, t0.FDOCUMENTSTATUS fdocumentstatus, t0.FFORBIDSTATUS fforbidstatus, t0_L.FFULLNAME ffullname, t0.FCREATEORGID fcreateorgid_id, t0.FUSEORGID fuseorgid_id, t0.FUSEORGID fuseorgid, t0.FGROUP fgroup, t0.FDEPTID fdeptid, t0.FMASTERID fmasterid, ROW_NUMBER() OVER( ORDER BY t0.FNUMBER ASC) fidentityid FROM T_BD_DEPARTMENT t0 LEFT OUTER JOIN T_BD_DEPARTMENT_L t0_L ON (t0.FDEPTID = t0_L.FDEPTID AND t0_L.FLocaleId = 2052) WHERE 1 = 0) tlist WHERE ((fidentityid >= 1) AND (fidentityid <= 200)) OPTION ( MAXDOP 0)
奇怪的是,为什么,它会有个过滤是 where 1 = 0 的,帮忙看下,谢谢
推荐阅读