Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty or Null value display in SSRS text boxes

Using SSRS (2008) what is the best way you have found to handle null or empty values and replace them with something else to display. The quite obvious solutions is

=IIF(IsNothing(Fields!MyField.Value),"NA",Fields!MyFields.Value)

That works though it is tedious, my hope was to find something like an EmptyText property on the textbox but alas nothing. Any ideas? Should I make a custom report item from the TextBox base that creates this property?

like image 269
keithwarren7 Avatar asked Aug 09 '10 16:08

keithwarren7


1 Answers

=IIF(ISNOTHING(CStr(Fields!MyFields.Value)) or CStr(Fields!MyFields.Value) = "","-",CStr(Fields!MyFields.Value))

Use this expression you may get the answer.

Here CStr is an default function for handling String datatypes.

like image 75
rajsekar Avatar answered Oct 22 '22 04:10

rajsekar