【往来对账明细表】打开报表提示报错
1,267次浏览
编辑于2015年01月12日 09:46:08
打开往来对账明细表提示报错:
INSERT INTO TM_AR_DETAILRPT_DTL (FID, FFORMID, FCONTACTUNITID, FCURRENCYFORID, FCURRENCYID, FSETTLEORGID, FRPORGID, FBUSINESSDEPTID, FBILLTYPEID, FBUSINESSTYPEID, FLEFTAMOUNTFOR, FLEFTAMOUNT) SELECT T1.FID, 'AP_OtherPayable' FFORMID, T1.FCONTACTUNIT FCONTACTUNITID, T1.FCURRENCYID FCURRENCYFORID, T1.FMAINBOOKSTDCURRID, T1.FSETTLEORGID, T1.FPAYORGID FRPORGID, T1.FDEPARTMENTID, T1.FBILLTYPEID, 4 FBUSINESSTYPEID, (0 - T1.FTOTALAMOUNTFOR) FLEFTAMOUNTFOR, (0 - T1.FNOTSETTLEAMOUNT) FLEFTAMOUNT FROM T_AP_OTHERPAYABLE T1 LEFT OUTER JOIN TM_AR_ORGENDDATE T501 ON T501.FSETTLEORGID = T1.FSETTLEORGID INNER JOIN V_FIN_CONTACTTYPE U31 ON (T1.FCONTACTUNIT = U31.FItemID AND (FFormid IN ('BD_Supplier', 'BD_Customer'))) WHERE ((((((((((T1.FDOCUMENTSTATUS <> 'Z') AND T1.FCANCELSTATUS = 'A') AND EXISTS (SELECT 1 FROM ( select COLUMN_VALUE as FID from TABLE(cast(:FORGID_udt as udt_inttable))) selorg WHERE SelOrg.FID = T1.FSETTLEORGID)) AND (T1.FISINIT = '1' OR (T1.FDate >= T501.FSYSSTARTDATE))) AND (T1.FDate >= NVL(T501.FENDDATE, :initDate))) AND (T1.FDate < :FBeginDATE)) AND (1 = 1 AND T1.FCONTACTUNITTYPE = 'BD_Customer')) AND T1.FACCOUNTSYSTEM = 0) AND U31.FCorrespondOrgId = 0) AND T1.FDOCUMENTSTATUS = 'C')
INSERT INTO TM_AR_DETAILRPT_DTL (FID, FFORMID, FCONTACTUNITID, FCURRENCYFORID, FCURRENCYID, FSETTLEORGID, FRPORGID, FBUSINESSDEPTID, FBILLTYPEID, FBUSINESSTYPEID, FLEFTAMOUNTFOR, FLEFTAMOUNT) SELECT T1.FID, 'AP_OtherPayable' FFORMID, T1.FCONTACTUNIT FCONTACTUNITID, T1.FCURRENCYID FCURRENCYFORID, T1.FMAINBOOKSTDCURRID, T1.FSETTLEORGID, T1.FPAYORGID FRPORGID, T1.FDEPARTMENTID, T1.FBILLTYPEID, 4 FBUSINESSTYPEID, (0 - T1.FTOTALAMOUNTFOR) FLEFTAMOUNTFOR, (0 - T1.FNOTSETTLEAMOUNT) FLEFTAMOUNT FROM T_AP_OTHERPAYABLE T1 LEFT OUTER JOIN TM_AR_ORGENDDATE T501 ON T501.FSETTLEORGID = T1.FSETTLEORGID INNER JOIN V_FIN_CONTACTTYPE U31 ON (T1.FCONTACTUNIT = U31.FItemID AND (FFormid IN ('BD_Supplier', 'BD_Customer'))) WHERE ((((((((((T1.FDOCUMENTSTATUS <> 'Z') AND T1.FCANCELSTATUS = 'A') AND EXISTS (SELECT 1 FROM ( select COLUMN_VALUE as FID from TABLE(cast(:FORGID_udt as udt_inttable))) selorg WHERE SelOrg.FID = T1.FSETTLEORGID)) AND (T1.FISINIT = '1' OR (T1.FDate >= T501.FSYSSTARTDATE))) AND (T1.FDate >= NVL(T501.FENDDATE, :initDate))) AND (T1.FDate < :FBeginDATE)) AND (1 = 1 AND T1.FCONTACTUNITTYPE = 'BD_Customer')) AND T1.FACCOUNTSYSTEM = 0) AND U31.FCorrespondOrgId = 0) AND T1.FDOCUMENTSTATUS = 'C')
推荐阅读