Change query result in report viewer

5 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    12 posts
    Member since:
    Feb 2013

    Posted 02 Apr 2013 Link to this post

    Hello Guys, 

    In my DB I have a column with bool value, when I get a report my report viewer show this column as "TRUE" or "FALSE", I want change this report viewer to show "YES" and "NO". How can I do this?

    I posted in attach a image showing this.

    Thanks!
  2. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 02 Apr 2013 Link to this post

    You can use the IIf Function in the Value Property of the TextBox.

    IIf(Fields.myBoolean,'YES','NO')

    Regards
    Erwin
  3. DevCraft banner
  4. Ricardo
    Ricardo avatar
    12 posts
    Member since:
    Feb 2013

    Posted 03 Apr 2013 Link to this post

    Thank you Erwin, IT's working now! :D
  5. Dave
    Dave avatar
    16 posts
    Member since:
    Oct 2007

    Posted 15 Nov 2013 Link to this post

    Can you do this for a 1 or 0 bit field as well.
  6. Squall
    Squall avatar
    174 posts
    Member since:
    Feb 2011

    Posted 15 Nov 2013 Link to this post

    Have you tried to use IIF function with bit data fields? If it doesn't work out of the box try with conversion function =IIF(CBool(Fields.MyField),'YES','NO')

    SN
Back to Top
DevCraft banner