I have a field in an SSRS report that changes what it displays based on the dataset results. I return a VarChar field that has either an A,I or an empty string. I use a switch statement to determine the value displayed.
If it is either A or I that is returned it displays a value from a different textbox on the report. If an empty string is returned it displays the empty string. It works when an A or an I is returned but it displays #error if an empty string is returned. Here is the expression in the report:
=Switch(Fields!FOOTNOTE.Value = "A", LTrim(RTrim(ReportItems!Textbox4.Value.ToString)),Fields!FOOTNOTE.Value = "I", LTrim(RTrim(ReportItems!Textbox5.Value.ToString)),LTrim(RTrim(Fields!FOOTNOTE.Value))="","")
I double checked the dataset directly in SQL server and verified that it is actually an empty string being returned and not a NULL value.
Any ideas or even a workaround would be helpful in this situation.