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!

problem converting boolean to string 1

Status
Not open for further replies.

chrisgeek

Technical User
Oct 16, 2008
25
US
I am working with a report that I need to sort by items that have not been charged. In this case the "is charged" field is a boolean with an answer of Yes or left null. The select expert doesn't work with false as the field is null. When I try to use Cstr it tells me the formula must result in a number. I'm sure that I'm missing something simple but any help you can give is greatly appreciated.

Thanks
 
To handle the null,

if isnull({table.ischarged}) then
"NO"
else if {table.ischarged} then
"YES"
else
"NO"

The last else will set to "NO" in the event {table.ischarged} is set to False.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top