Compute formula in runtime
Hi,
how can I solve the following task?
I would like to compute variables. For the computation I have a formulas.
In the formula can be used different functions. I can define these
functions in the program (RAP?).
Example for Formula:
GetStatVarValue('MyVariable12')*100/GetStatVarValue('MyVariable08')
I would have gladly something like this in OnCalc event
EvaluateFormula('
GetStatVarValue('MyVariable12')*100/GetStatVarValue('MyVariable08') ') .
I must make that all in runtime.
How do I have to define the function GetStatVarValue in the program? How can
I implement EvaluateFormula?
Regards
Marek
P.S. I use RB 10.03
how can I solve the following task?
I would like to compute variables. For the computation I have a formulas.
In the formula can be used different functions. I can define these
functions in the program (RAP?).
Example for Formula:
GetStatVarValue('MyVariable12')*100/GetStatVarValue('MyVariable08')
I would have gladly something like this in OnCalc event
EvaluateFormula('
GetStatVarValue('MyVariable12')*100/GetStatVarValue('MyVariable08') ') .
I must make that all in runtime.
How do I have to define the function GetStatVarValue in the program? How can
I implement EvaluateFormula?
Regards
Marek
P.S. I use RB 10.03
This discussion has been closed.
Comments
You can create stand alone routines in RAP using the Module | Programs
option. Take a look at the RAP demos located in the \RBuilder\Demos\0.
RAP\Main... directory for an example of this. Check out demo #23.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com