Hi All -
oiy! this one is a pain. I have a column in a dataset that is technically string but in reality has both string and numeric values. well I want to test for numeric values ... and then format accordingly. so for example suppose i have a dataset that goes ...
10
20
30
apple
40
50
I want the format to be currency. here is my expression. *IsNumeric is a UDF that simply wraps Microsoft.VisualBasic.IsNumeric.*
=iif(IsNumeric(Fields.[YTD Target]),Format("{0:c}",CDbl(Fields.[YTD Target])),Fields.[YTD Target])
well the report bombs on 'apple' citing 'Input was not in correct format.
The only thing I can figure is that both True and False parts are fully evaluated when IIF is called.. so in the case of 'apple' the True part will surely fail eventhough isNumeric("apple") = False
oiy! this one is a pain. I have a column in a dataset that is technically string but in reality has both string and numeric values. well I want to test for numeric values ... and then format accordingly. so for example suppose i have a dataset that goes ...
10
20
30
apple
40
50
I want the format to be currency. here is my expression. *IsNumeric is a UDF that simply wraps Microsoft.VisualBasic.IsNumeric.*
=iif(IsNumeric(Fields.[YTD Target]),Format("{0:c}",CDbl(Fields.[YTD Target])),Fields.[YTD Target])
well the report bombs on 'apple' citing 'Input was not in correct format.
The only thing I can figure is that both True and False parts are fully evaluated when IIF is called.. so in the case of 'apple' the True part will surely fail eventhough isNumeric("apple") = False