StrToInt
Hi,
I have a string varibale which I want to convert to an Interger/Double, so
that I can use it to calculate something.
I have tried to take the variable and convert like so:
Value := StrToInt(Variable16.Value);
But that doesnt work.
The string in variable 16 is being fed from a sub report - thatas why its
in string format. I cant take values from a subreport in integer format.
help please!
thanks
Redmond
I have a string varibale which I want to convert to an Interger/Double, so
that I can use it to calculate something.
I have tried to take the variable and convert like so:
Value := StrToInt(Variable16.Value);
But that doesnt work.
The string in variable 16 is being fed from a sub report - thatas why its
in string format. I cant take values from a subreport in integer format.
help please!
thanks
Redmond
This discussion has been closed.
Comments
Since the TppVariable.Value property is a variant type, you should not have
to convert it from a string. I believe the variant class will recognize if
the value is not a valid number and throw an exception if it isn't.
Value := Variable16.Value...
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Try using TryStringToInt() so you don't need to catch an exception.
What happens?