| View previous topic :: View next topic |
| Author |
Message |
Plipp General User


Joined: 27 Sep 2008 Posts: 13 Location: Germany
|
Posted: Mon Oct 12, 2009 5:02 am Post subject: Calculate BMI (body mass index) in form |
|
|
Hello,
MY QUESTION: I have two formfields "weight (kg)" and "height (m)" and i want to calculate "BMI" (body mass index) using the formula "kg / m^2".
BEST is, the "BMI" value is a new field, because i want to group and sort all the data using Calc.
I read about problems about this but did not understand it, yet.
Is it possible?
Thank you so much!
Plipp
PS: i use an OOO Base MySQL database with a linux OS. I connect to the database using ODBC.
The OOO database is easy to handle and i already have lots of data. _________________ OOo 3.0 Ubuntu 9.04 |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 1716 Location: Apeldoorn, Netherland
|
Posted: Mon Oct 12, 2009 7:27 am Post subject: |
|
|
Hello
Your question is not clear.
I think make query and import the values you need in OOo-calc.
That is not a form.
Romke |
|
| Back to top |
|
 |
Plipp General User


Joined: 27 Sep 2008 Posts: 13 Location: Germany
|
Posted: Mon Oct 12, 2009 9:36 am Post subject: third field |
|
|
my idea was:
i have a form with two fields: weight (kg) + height (m) where i put in my data.
there is a third field below, where the result is calculated automatically.
is this possible?
sorry for the unclear question.
thank you very much.
Plipp _________________ OOo 3.0 Ubuntu 9.04 |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 1716 Location: Apeldoorn, Netherland
|
Posted: Mon Oct 12, 2009 10:24 am Post subject: |
|
|
Hello
When you input data in a form then you can not get a calculated result in the same form.
Form fields must be connected with a field in a table. A calculated field does not have a connection to a field so you have a problem.
So I think it is not possible in an easy way and I don't know a solution
Romke |
|
| Back to top |
|
 |
r4zoli OOo Advocate

Joined: 17 May 2005 Posts: 486 Location: Budapest, Hungary
|
Posted: Mon Oct 12, 2009 10:42 am Post subject: |
|
|
| Add a subform to the form, add textbox to subform and as datasource use query which calculates BMI. |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 7649 Location: Germany
|
|
| Back to top |
|
 |
Plipp General User


Joined: 27 Sep 2008 Posts: 13 Location: Germany
|
Posted: Mon Oct 12, 2009 11:50 am Post subject: display query results |
|
|
I will try this and i think this will solve my problem.
thank you.
great work as usual!  _________________ OOo 3.0 Ubuntu 9.04 |
|
| Back to top |
|
 |
|