Crystal reports 对Crystal Report中的列求和,当为空时求和=0
我想对Crystal Report中的一列求和,但当该列为空时,它不会显示Sum=0 这是公式Crystal reports 对Crystal Report中的列求和,当为空时求和=0,crystal-reports,sum,Crystal Reports,Sum,我想对Crystal Report中的一列求和,但当该列为空时,它不会显示Sum=0 这是公式 if isnull(Sum ({VSalesIncome.TotalPrice})) then 0 else Sum ({VSalesIncome.TotalPrice}) 这是一个错误 error in Formula Sum Price : isnull(Sum ({VSalesIncome.TotalPrice})) A number field or currency amount fie
if isnull(Sum ({VSalesIncome.TotalPrice}))
then 0
else
Sum ({VSalesIncome.TotalPrice})
这是一个错误
error in Formula Sum Price :
isnull(Sum ({VSalesIncome.TotalPrice}))
A number field or currency amount field is required here
Details errorkind:
求和忽略空值,所以只需求和 或者,如果坚持检查null,请使用详细程度公式:
if isnull({VSalesIncome.TotalPrice}) then 0 else {VSalesIncome.TotalPrice}
然后对公式求和。公式中找不到sum,当值sum price为null时,在公式sum price中显示erorr erorr:如果为null({VSalesIncome.TotalPrice}),则0其他{VSalesIncome.TotalPrice}这里需要一个数字,详细信息错误听起来像{VSalesIncome.TotalPrice}不是数字。