Hi all:
I have a query that returns strings. However, I would like to conditionally format the data as a string or int. The following renders "# Error" in my report when it encounters data I want to format as string.
=Switch(
Fields!SORT_FLAG.Value=0,Fields!C1.Value,
Fields!SORT_FLAG.Value=1,Fields!C1.Value,
Fields!SORT_FLAG.Value=2,CInt(Fields!C1.Value))
Can anyone explain this and/or suggest how to get the result I want?
TIA,
Sven
I have a query that returns strings. However, I would like to conditionally format the data as a string or int. The following renders "# Error" in my report when it encounters data I want to format as string.
=Switch(
Fields!SORT_FLAG.Value=0,Fields!C1.Value,
Fields!SORT_FLAG.Value=1,Fields!C1.Value,
Fields!SORT_FLAG.Value=2,CInt(Fields!C1.Value))
Can anyone explain this and/or suggest how to get the result I want?
TIA,
Sven