Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

"Value is not a boolean" error for filter based on a boolean ... what value should I use for True? Expand / Collapse
Author
Message
Posted Tuesday, July 24, 2012 9:46 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, May 27, 2014 6:10 AM
Points: 113, Visits: 150
I'm using a Filter for the first time.

In the Dataset Properties dialog box in the Filters tab I clicked on Add then selected the field I want to filter on from the Expression dropdown list. SSRS recognizes the field as a Boolean. (The field is defined as BIT, NOT NULL in the source table.)

The Operator is "=".

In the Value field I've tried 1, "1", 0, True, "True", YES, and "YES". Each of them causes a dialog box to pop up saying "<Value>
Value is not a boolean."

What value should I use for a boolean in this context?

Thanks in advance for any assistance.

Christian Bahnsen

Post #1334596
Posted Tuesday, July 24, 2012 1:40 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 10:52 AM
Points: 3,374, Visits: 7,302
Remember that bit is not boolean, so you have to compare it to 1.
e.g. bit_field = 1



Luis C.
I am a great believer in luck, and I find the harder I work the more I have of it. Stephen Leacock

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1334762
Posted Wednesday, July 25, 2012 8:18 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, May 27, 2014 6:10 AM
Points: 113, Visits: 150
Hopefully you'll be able to see the screenshot I uploaded.

I've come up with a workaround using expressions, but to my mind the approach shown in the screenshot SHOULD work.

I'm going to write it off to an idiosyncracy.

Chris


  Post Attachments 
ssrs_filter_problem.JPG (24 views, 44.60 KB)
Post #1335160
Posted Wednesday, July 25, 2012 9:04 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 10:52 AM
Points: 3,374, Visits: 7,302
That's the problem we face when SQL Server does not use the same datatypes for all of its tools.
the value you're looking for should be: true (with no quote marks).
I'm relatively new to SSRS too, but I'm using 2008 and it works fine.



Luis C.
I am a great believer in luck, and I find the harder I work the more I have of it. Stephen Leacock

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1335199
Posted Wednesday, July 25, 2012 10:06 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, May 27, 2014 6:10 AM
Points: 113, Visits: 150
Good job!

I tried using True yesterday but it kept throwing the error.

Today when I use True (it's not case sensitive because I tested true, True, TRUE) SSRS accepted the Value.

Go figure.

Thanks again
Post #1335258
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse