Setting displayvalue for varchar(1) field

edited July 2016 in General

we are using firebird as our database-system which unfortunately does
not support boolean-types.
Boolean-fields are stored as varchar(1), contatining the
In our use-case we would like to display "Ja"(German: yes) for 'T' or
"Nein"(German:No) for 'F'.
To do this, we use a DBText,settings its display-values to 'Ja;Nein'.
The result is always 'J;ein'.

Any Ideas what to do?

In ancient times we were using Paradox, which supported a boolean
fieldtype, and everthing worked fine.



Hint: We altered the sources!Hint: We altered the sources!


  • edited July 2016
    Hi Carsten,

    If you look inside the ppDisplayFormat.pas file you can see how display
    formats are processed in ReportBuilder. Note that the data type is used
    to determine which display format code to execute.

    In your case for boolean fields, the code for "dtString, dtChar, etc."
    will fire instead of "dtBoolean".

    In order to work around this strange limitation of Firebird, you will
    likely need to create a TppDisplayFormat descendant and override the
    Format routine to process fields with a value of 'T' or 'F' similarly to

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited July 2016
    Hi Nico,

    after setting type to dtBoolean and switching off "autocreatefields"
    everything works fine, out of the box.

    Thx Carsten

    Nico Cizik (Digital Metaphors) drückte sich sehr genau aus :


    Hint: We altered the sources!Hint: We altered the sources!
This discussion has been closed.