【发布时间】:2021-11-04 18:35:14
【问题描述】:
我试图让报告显示用户在参数中输入的购买价格。如果用户没有输入任何内容,它将显示“未公开”,否则我希望它以货币形式显示购买价格。我尝试了以下方法:
=IIF(Parameters!PurchasePrice.Value = "", "Undisclosed", Cstr(Format(Parameters!PurchasePrice.Value, "C")))
=IIF(Parameters!PurchasePrice.Value = "", "Undisclosed", Format(Parameters!PurchasePrice.Value, "C"))
=IIF(Parameters!PurchasePrice.Value = "", "Undiscloded", FormatCurrency(Parameters!PurchasePrice.Value,0))
=IIF(Parameters!PurchasePrice.Value = "", "Undiscloded", FormatNumber(Parameters!PurchasePrice.Value,0))
我可以让“未公开”出现,但每次我输入一个数字时,它都会显示#Error
【问题讨论】:
-
如果你使用它会发生什么? =IIF(Parameters!PurchasePrice.Value = "", "Undiscloded", Format(Parameters!PurchasePrice.Value,"'$'0.00;('$'0.00)"))