locked
Report Builder: How to display boolean fields as Yes/No instead of True/False RRS feed

  • Question

  • User345637616 posted

    I created a Report Model in Visual Studio and deployed it to the Report Server.  When users create reports using the Report Builder the boolean columns display as True/False.  They would like them to display as Yes/No.  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.  I changed it to yesno (it was blank) but the values still display as True and False. 

     Has anyone any tried this or has anyone had any luck getting boolean columns to display as Yes/No in the Report Builder?

     Thank you!

    Wednesday, May 9, 2007 1:20 PM

All replies

  • User-116373494 posted

    I think you have to refresh the schema for the report's datasource - something like that.

    the report definition doesn't update itself after you make a change - you have to do something like refresh schema( I can't remember what it was called )

    at worst, recreate the report... 

    Thursday, May 10, 2007 12:24 AM
  • User345637616 posted

    The refresh didn't work.

    Also, it's not just existing reports, any new reports created are also still showing True/False.

    Thursday, May 10, 2007 11:16 AM
  • User-650471302 posted

    I'm having the same problem as well - any formatting you specify seems to be ignored (the doc lists a way to specify what to display for "True" and for "False" as well).  Anyone?

    Thanks,

    Dan.

     

    Friday, May 11, 2007 11:07 AM
  • User-1914796816 posted

    Of course you can always change the Expression to:

        =IIf(Fields!myBitField.Value, "Yes", "No")   - NB: you may also want to handle NULLs differently if you can have nulls

    Alternatively you fix your SQL by casting your field to a smallest integer type (in SQL Server if it is declared as myBitField BIT you can use CAST(myBitField AS TINYINT) ) and then use Text Box Properties to set a Custom Number Format of 'Yes';;'No'. If I find an update or alternative solution that's avoids casting I will post it.

    Thursday, September 17, 2015 9:00 PM
  • User820687296 posted

    It worked, Thanks for the solution.

    Friday, May 11, 2018 7:00 PM
  • User820687296 posted

    It worked, Thanks gryptonite.

    Friday, May 11, 2018 7:01 PM