0
votes

I have small expression on value fields in SSRS report. Source data type of value is NVARCHAR. It has some numeric value as well which I want to convert into currency and else should be display as it is.

=IIF(Fields!Description.Value LIKE "Blank*","",
    IIF(IsNumeric(Fields!Value.Value)=True,FormatCurrency(Fields!Value.Value,0),Fields!Value.Value)
    )

Report displays the numeric values in currency format but where it has string values it showing #Error.

1

1 Answers

0
votes

I don't think you can use LIKE in an SSRS expression.. you need to use something like this:

=IIF(InStr(Fields!Description.Value,"Blank")>0,"",
    IIF(IsNumeric(Fields!Value.Value)=True,FormatCurrency(Fields!Value.Value,0),Fields!Value.Value)
    )