OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Calculate BMI (body mass index) in form

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Plipp
General User
General User


Joined: 27 Sep 2008
Posts: 13
Location: Germany

PostPosted: Mon Oct 12, 2009 5:02 am    Post subject: Calculate BMI (body mass index) in form Reply with quote

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
View user's profile Send private message Visit poster's website
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Mon Oct 12, 2009 7:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Plipp
General User
General User


Joined: 27 Sep 2008
Posts: 13
Location: Germany

PostPosted: Mon Oct 12, 2009 9:36 am    Post subject: third field Reply with quote

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
View user's profile Send private message Visit poster's website
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Mon Oct 12, 2009 10:24 am    Post subject: Reply with quote

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
View user's profile Send private message
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Mon Oct 12, 2009 10:42 am    Post subject: Reply with quote

Add a subform to the form, add textbox to subform and as datasource use query which calculates BMI.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Oct 12, 2009 10:59 am    Post subject: Reply with quote

Forms don't calculate anything, but they can be used to display results calculated in queries.

Calculating a volume from 3 numbers ("horizontal calculation" across 3 fields): http://user.services.openoffice.org/en/forum/download/file.php?id=1266

Calculating aggregations for grouped categories ("vertical calculation" within fields): http://user.services.openoffice.org/en/forum/download/file.php?id=2950
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Plipp
General User
General User


Joined: 27 Sep 2008
Posts: 13
Location: Germany

PostPosted: Mon Oct 12, 2009 11:50 am    Post subject: display query results Reply with quote

I will try this and i think this will solve my problem.

thank you.
great work as usual! Very Happy
_________________
OOo 3.0 Ubuntu 9.04
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group