We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

Formulas in Data Field Type & Data field [closed]

asked 2017-06-19 05:57:20 +0200

EasyTrieve gravatar image

updated 2017-06-19 06:20:42 +0200

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-10-07 22:14:19.317540

1 Answer

Sort by » oldest newest most voted

answered 2017-06-19 18:20:01 +0200

updated 2017-06-24 08:39:23 +0200

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

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

Edit: in this file it works:

Report con 2 campi concatenati.odb

image description

edit flag offensive delete link more


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

EasyTrieve gravatar imageEasyTrieve ( 2017-06-21 16:08:22 +0200 )edit

Please seee my Edit

charlie.it gravatar imagecharlie.it ( 2017-06-24 08:35:21 +0200 )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.)

EasyTrieve gravatar imageEasyTrieve ( 2017-06-27 03:55:42 +0200 )edit

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.

EasyTrieve gravatar imageEasyTrieve ( 2017-06-27 04:03:08 +0200 )edit

Question Tools

1 follower


Asked: 2017-06-19 05:57:20 +0200

Seen: 141 times

Last updated: Jun 24 '17