Originally Posted 12 January 2017, 5:21 am ESTHi
Is there any way in which I can configure Flex Reports to treat NaN as zero so that expressions return zero and running totals show the correct total rather than NaN.
I am new to Flex Reports. I am in the process of converting all our reports to it. One problem I have found is that we have lots of expressions that may result in divide by zero. For example Total / Quantity where the quantity is zero. Our old report writer simply treated this as zero but Flex Reports is showing NaN which then also means that running totals show NaN.
I can resolve the problem by applying IIF statements to check to see if the divisor is zero and thus return zero as shown below but we have hundreds of expressions like this and tracking them all down will be challenging. Also as seen below this makes the expression more complex than it needs to be.
iif (Quantity = 0,0,Total / Quantity)