当我尝试使用crystal report版本12.3.0.601中的参数运行sql存储过程时,出现了这个错误。
从excel或sql分析器它正在工作。但我需要crystal report按照我们部门的要求格式化报告。
错误:
无法从数据库检索数据。详细信息:42000:[microsoft][odbc sql server驱动程序][sql server]第1行:'-'附近的语法不正确[数据库供应商代码:170]
存储过程:
exec qrp\u inv\u get\u data@inv\u no={?inv\u no}
存储过程的内容:
* SELECT
A.INVOICE_ID,
A.CUSTOMER_ID,
A.INVOICE_DATE,
A.TOTAL_AMOUNT,
A.TERMS_DESCRIPTION,
A.SELL_RATE,
A.CURRENCY_ID,
B.PACKLIST_ID,
B.LINE_NO,
B.REFERENCE,
B.QTY,
C.SPEC,
D.BILL_TO_NAME,
D.BILL_TO_ADDR_1,
D.BILL_TO_ADDR_2,
D.BILL_TO_ADDR_3,
D.USER_1,
D.USER_2,
D.USER_3,
D.USER_4,
D.USER_5,
D.USER_6,
E.CUSTOMER_PO_REF,
F.CUSTOMER_PART_ID,
F.MISC_REFERENCE,
F.SELLING_UM,
F.UNIT_PRICE,
G.FREE_ON_BOARD
FROM RECEIVABLE A
INNER JOIN RECEIVABLE_LINE B
ON A.INVOICE_ID = B.INVOICE_ID
INNER JOIN TSW_RECEIVABLE_BINARY C
ON B.INVOICE_ID = C.INVOICE_ID
INNER JOIN CUSTOMER D
ON D.ID=A.CUSTOMER_ID
INNER JOIN CUSTOMER_ORDER E
ON B.CUST_ORDER_ID = E.ID
INNER JOIN CUST_ORDER_LINE F
ON E.ID = F.CUST_ORDER_ID
INNER JOIN SHIPPER G
ON G.PACKLIST_ID = B.PACKLIST_ID
WHERE A.INVOICE_ID = @INV_NO*
暂无答案!
目前还没有任何答案,快来回答吧!