Formulas in Data Field Type & Data field

In Base Report Design how to I enter a formula here:

image description


I want to put in something like for example CONCAT(FieldName1, ’ ', FieldName2) in for the Data field. It appears that it will take this from the = sign here image description but I can’t figure out how to enter a formula.


I know that I can do this in the underlying query, but it just seemed like I was also able to do this in the Report design editor.

Ciao, use: [FieldName1] & " " & [FieldName2]

If my answer helped you, vote it with :heavy_check_mark: (here on the left)

Edit: in this file it works:

Report con 2 campi concatenati.odb

Thanks @charlie.it , I tried it but it does not work for me.

Please seee my Edit

Ok, Thanks. Finally figured out how to get it to work: after you edit the Data Field you must move the focus out of the Data Field , e.g. by typing Tab or the like. (This is obviously a bug, but I’ve reported so many recently that I’m going to let this one lie for now.)

Also for what it’s worth, some SQL function appear to work, like Pi(), but many SQL function silently fail to work. In particular one of my fields allows nulls, and so when the strings are concatenated by default if either string is null they sum to null which is no good. Normally I use IFNULL(..) or COALESCE(..) to fix this, but neither seems to work, at least not in Mariadb, nor HSQLDB1.8. Also LEFT("abc") returns “a”, but LEFT("abc",2) returns nothing. So, this works, barely.