Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling SQL Server 'Bit' values

Status
Not open for further replies.

Eyespider

Programmer
May 8, 2002
2
GB
Hi, We have a SQL Server 7 DB and it has certian values stored as the bit type.
I want to check if the value is false (i.e 0) and then carry out an action..
If {Db_Field} = 0 then do_action

When I try and execute the function i get an error saying 'A boolean is required'

I have tried putting the 0 in ""'s but the same error comes up. Using the word False (in ""'s and without) gives the error 'Number, Currency, Date or DateTime is required..

Does anyone know what is going on and how to get around it???

Thanks for any help you can give.

Regards
Simon.

 
Unfortunately, the BIT datatype is not recognized as one of the "standard" datatypes used in Crystal Reports. In my experience, I 've had to change the comparison expression to use the word 'TRUE' or 'FALSE' instead of 0 or 1. Also, to make it more fun, this doesn't necessarily work for different versions of Crystal (5,6,7,8). In V6 created RPT files, I've had to change the expression from False to 0 (or something like that) until the RPT would be satisfied with an expression it would be happy with.

I know it's not much help, but it does work.

WG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top