My data is stored in BIT field in SQL server (0 or 1) When I display it in reportviewer it shows TRUE or FALSE
I would like to change it to YES or NO Please advice.
According to Microsoft documentation you should be able to go to the properties of the column in the Report Model and set the Format attribute to either "truefalse" or "yesno" depending on how you want boolean values to display.
val1 = true; Now, use if statement to check and display the Boolean true value. if(val1) System. out.
You can change it in the report using iif.
=iif(Fields!YourBool.Value, "Yes", "No")
If your data is null then it will evaluate to "No". If you want it do be blank instead use this one
=iif(isnothing(Fields!YourBool.Value), "", iif(Fields!YourBool.Value, "Yes", "No"))
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