Display value of boolean in reports

Win10 LO 7.2.5.2 HSQL 2.5.1

Hi,

If one wants to display symbols like tics or crosses instead of the
default text aka yes or no I normally do this by way of property setting

e.g. IF(LEFT([selected])=“t”;"\u2612";"\u25A1")

now how could one modify this to show tick, cross and a dash for the fields null value
if the field is set to triple state ?
Thanks for pointers.

Hello,

Cannot find any method in Report Builder to check for a NULL condition. Everything I tried negated the condition or left the report field blank when it was null (even though I specified a value) while true & false continued to work.
This is most likely a bug in Report Builder. Did test creating an SQL statement with a CASE condition to send to the report and then use that to display what was wanted.

Thanks, will give the Case condition a shot.

Try

IF([Bool];"☒";IF(ISBLANK([Bool]);"-";"□"))

where “Bool” will be the field name of the datasource.

Will give here the following content for a boolean field:

report_boolean

1 Like

Have tried similar but tried yours. True & False results are OK but blank for NULL setting:

Screenshot at 2022-01-28 08-22-18

@RobertG

This works for me also. Did not try that method in my testing; did try ISBLANK but incorrect usage.

For simple, ungrouped but printable output I use Calc as report engine.
[Tutorial] Using registered datasources in Calc

Thank you all,
Got Roberts solution working

Screen Shot 01-28-22 at 04.13 PM

:smiley:

Did you comment under wrong answer and mark incorrect answer as solution?

Oops, can it be reversed?

It’s like code - no matter what is said, you know only if you actually try.

Display ‘Y’, ‘N’ or ‘?’ for a triple state boolean “B1”:

SELECT COALESCE(CASE "B1" WHEN True then 'Y' when False then 'N' end,'?') AS "State"  FROM "Table"