Page 1 of 1

convert string to decimal

Posted: Tue Sep 25, 2012 6:54 pm
by ksukat
Greetings,
I have 2 data fields that are passed into my report. (there are actually many).
I need to have (field1 / field2) * 100 displayed in a column. Here is the rub:
field1 and field2 are passed into the report as strings. Ie 7.35, 2.19 as strings.

How do I convert the string representation of the number to decimals so I can do the
calculation?

thanks.

Re: convert string to decimal

Posted: Thu Sep 27, 2012 6:32 am
by Alex K.
Hello,

Please try to use the following expression:
((decimal)field1 / (decimal)field2) * 100

Thank you.