I made a datareport in VB6 (not a crystal report).
There are some fields who contain a boolean-value.
Instead of a -1 or 0 on my report I want a Yes or No.
Is that possible with the datareport ?
How can i insert a control that accepts an expression like yours.
As far as I know, i can only insert datafields, and some
function controls but not an expression, or am i wrong ??
I had the same problem, but I was getting my data through a SQL query. If you are using SQL try something like:
select substring('Supply Fitted',(7*(fitted)),7) as isfitted, contractid from tblcontracts where ....
In my DB, fitted is a bit field (returns 1 for true), so substring as above returns first half or second half of 'Supply Fitted' as required
Check SQL BOL for substring Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
It's really quite simple and there is no need to play with SQL or IIF functions.
In the DataFormat property of the report control select a format type of Boolean. You can now select a value to display for a True Value, a False Value, and a Null Value.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.