5

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.

4

2 回答 2

5

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"))
于 2013-07-18T00:15:15.363 回答
1

and also you can display checkbox :

(change the textbox’s font to Wingdings2)

=IIf( Fields!MyBooleanField.Value, Chr(82), Chr(163))
于 2020-07-25T14:35:33.507 回答