using cint function in expression editor
Hi, I am a new to Reporting Services...
I am using RS2000
I am trying to apply cint function in the expression editor for the textbox
eg. i type in =cint(Fields!firstfield.Value/Fields!secondfield.Value).
This is returning error
The value expression for the textbox ‘HoldDuration’ contains an error: Arithmetic operation resulted in an overflow.
Could you please let me know what I did wrong in this and how to correctly apply VB or any custom functions in the expression editor where the expession output would be a decimal value and you are interested in getting an integer value by rounding the fractional part.
You may want to ensure that both values can be converted to integers before doing the division. IsNumeric function may help, or try doing the conversion on each field individually.
There may also be a problem with dividing by 0 though this should throw another error.
cheers,
Andrew
Hello Andrew, thanks for your reply.
both the values i am passing are integers....if I just include value1/value2 in the expression editor without passing the value into any function, it displays an integer correctly on the report rounded to the nearest value, but if I pass the value through a function,that is when I get this error...infact i wanted to format the display correctly using a custom code function but it threw the error. I wanted to try with another built in function first to narrow the source of the error like CInt and it also threw the same error....
Thanks,