Re: Round to nearest even dollar
Posted: Mon Sep 28, 2015 6:14 pm
Ivan wrote:Hello,
If you need to use this expression in several places, it is better to describe it as a function, and use this function in expressions.jrSD wrote:Is there a better way to accomplish this?
For example, you can add following function into the report, on the Code tab of designer:
and then use this function in expressions:Code: Select all
Function MyRound(ByVal num As Double) As Double MyRound = CInt((Math.Round(num+0.00001,4)+1)/2)*2 End Function
Thank you.Code: Select all
{MyRound(3.75)} {MyRound(4.1)}
Brilliant! Thank you very much!!