窗口应用程序中Crystal Report公式中的错误

时间:2016-05-18 11:24:03

标签: crystal-reports

文件错误temp_0592bd8d-2dfd-4b7c-b64e-d76ffd705741 {DAE19A7B-FA99-494F-9C0D-376C756D5097} .rpt:

公式BalanceAmount中的错误:

'(CDBL({@Total})-({@PayableAmount}))'

字符串是非数字的。

详细信息:errorKind

编辑-----------------------------------

总公式:

{spForFeeRecipt.Fine}+cdbl({spForFeeRecipt.AdmissionFees}+{spForFeeRecipt.Total‌​Fees})

应付金额

({spForFeeRecipt.Fine}+{spForFeeRecipt.PaidAmount}+cdbl({spForFeeRecipt.Admissi‌​ onFees}))

1 个答案:

答案 0 :(得分:0)

您的字段@Total有一些字符串形式的非数字,如10b,您会遇到这类错误。

在首先检查之前,您需要确保它是字符串形式的总数字,然后再按照下面的cdbl

if IsNumeric({@Total})
then (CDBL({@Total})-({@PayableAmount}))
else //your code

首先检查Total字段的输出,然后应用公式