Page 1 of 1

Date Problem

Posted: Mon Oct 04, 2010 6:09 am
by albloshi
I have a date field with the text expression

Cont. Dep. SR: {Round(fileFrontPage.ContDepFee,2)}

Where fileFrontPage.ContDepFee is a double(nullable) field in my dataset

It is showing error

c:\Users\Abdulaziz\AppData\Local\Temp\trjdeckv.0.cs(301,97) : error CS1502: The best overloaded method match for 'System.Math.Round(double, int)' has some invalid arguments
c:\Users\Abdulaziz\AppData\Local\Temp\omdi8flw.0.cs(301,115) : error CS1503: Argument '1': cannot convert from 'double?' to 'double'

waiting for a clue to move...

thanx in advance

Date Problem

Posted: Mon Oct 04, 2010 6:25 am
by Alex K.
Hello,

You can use the following expression:

Code: Select all

{Round(fileFrontPage.ContDepFee.GetValueOrDefault(),2)}
Thank you.