convert integer value to string and if it fails set "##" - SSRS

pedram picture pedram · Dec 7, 2015 · Viewed 34.6k times · Source

I have below line in crystal report formula, It means that if string conversion failed it will print ##.

CStr({rptReport;1.Total},"##")

Now, the question is how can I achieve this by SSRS Expression.

Answer

Ankit Sondagar picture Ankit Sondagar · Dec 7, 2015

Try something like this,

=IIF(CStr(Fields!Total.Value),CStr(Fields!Total.Value),"##")