Ask Your Question
0

Formulas in Data Field Type & Data field

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

EasyTrieve gravatar image

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

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 close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

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

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

Comments

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

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

Please seee my Edit

charlie.it gravatar imagecharlie.it ( 2017-06-24 08:35:21 +0100 )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 +0100 )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 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 51 times

Last updated: Jun 24