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
.
NumberFormatException is caused when a conversion between strings and number fails.
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.
Try something like this,
=IIF(CStr(Fields!Total.Value),CStr(Fields!Total.Value),"##")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With