I have a report in SQL Reporting that is pretty simple. It does some simple calucalations. One of them is to subtract an estimated total hours from actual labor hours on projects. The estimated total hours does not alwasy have an entry so the syntax is set to display zero if nothing is there.
Box 1: =IIF(IsNothing(Fields!User_Define_1.Value), 0, Fields!User_Define_1.Value)
Box 2: =Fields!Act_Labor_Units_TTD.Value
Box 3: =(CInt(Fields!User_Define_1.Value))-Fields!Act_Labor_Units_TTD.Value
The User_Define_1 field is a text field so to do the calculation I had to convert it to integer.
My problem is this, some of the calculations are not coming out right, it seems to be off by 0.25 on some of them. For example on one project Box 1 has 64.75 and box 2 has 66. Box three should say -1.25 but instead it says -1.00
I have a feeling it's rounding them off (maybe during the conversion to integer?) isr there any additional syntax I should be using with the Cint to keep it at 2 decimals instead of more?