format float
Hello ,
I have Fields that have 15 decimal places. I want to only use the
first two decimals to get my product using a variable.
eg: 4.32654654 * 2.36465465
I want to use 4.33 * 2.36 (the rounded values)
I tried using a "FormatFloat('0.00',VALUE)" function, but upon running
the report i get the error.
"Could Not run program: VariableOnSumCalc. Could not convert variant
of type (string) into type (currency).
But if i change the variable to a string it gives me the same error.
Any ideas?
thanks
Red
I have Fields that have 15 decimal places. I want to only use the
first two decimals to get my product using a variable.
eg: 4.32654654 * 2.36465465
I want to use 4.33 * 2.36 (the rounded values)
I tried using a "FormatFloat('0.00',VALUE)" function, but upon running
the report i get the error.
"Could Not run program: VariableOnSumCalc. Could not convert variant
of type (string) into type (currency).
But if i change the variable to a string it gives me the same error.
Any ideas?
thanks
Red
This discussion has been closed.
Comments
I believe the FormatFloat routine returns a string value. In my testing
with the following code in the OnCalc event in RAP, I did not receive an
error when setting my TppVariable to a String type.
Value := FormatFloat('0.00', 4.32654654);
What are you entering in as "VALUE"? This will need to be an Extended type
in order for this function to work correctly.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com