=IIF (Fields!LastGiftDate.Value >0, (Format(Cdate (Fields!LastGiftDate.Value),"dd-MM-yyyy")), " ")
如果没有日期,上面的查询会给我空间,但如果有日期值,它会给我#Error。帮助
答案 0 :(得分:0)
您需要使用isDate
函数来确定它是否为日期。 SSRS
iif
条件未被短路。
=IIF (isDate(Fields!LastGiftDate.Value)
,IIF (isDate(Fields!LastGiftDate.Value), (Format(Cdate (Fields!LastGiftDate.Value),"dd-MM-yyyy")),NOTHING)
, " ")
OR
=IIF (isDate(Cdate(Fields!LastGiftDate.Value))
,IIF (isDate(Fields!LastGiftDate.Value), (Format(Cdate (Fields!LastGiftDate.Value),"dd-MM-yyyy")),NOTHING)
, " ")
OR(尝试忽略短cicuit行为)
=IIF (isDate(Fields!LastGiftDate.Value), (Format(Cdate (Fields!LastGiftDate.Value),"dd-MM-yyyy")), " ")
OR
=IIF (isDate(Cdate(Fields!LastGiftDate.Value)), (Format(Cdate (Fields!LastGiftDate.Value),"dd-MM-yyyy")), " ")