Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 937
pedram Avatar asked Dec 07 '15 13:12

pedram


People also ask

What is called when a conversion between string and number fails?

NumberFormatException is caused when a conversion between strings and number fails.

Can string take integer values?

We can convert String to an int in java using Integer.parseInt() method. To convert String into Integer, we can use Integer.valueOf() method which returns instance of Integer class.


1 Answers

Try something like this,

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

like image 54
Ankit Sondagar Avatar answered Sep 24 '22 11:09

Ankit Sondagar