I created a report with multiple fields. I would like to create a generic formula in which it evaluates all the values and if it found a null or empty value it will be replaced by a 'N/A'. I was trying to use the following formula for one of the database value:
if isnull({PID_.CND7/T_EXPRESSION#EXPRESSION}) then "N/A" else {PID_.CND7/T_EXPRESSION#EXPRESSION} = {PID_.CND7/T_EXPRESSION#EXPRESSION}
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Posted: 06 Apr 2010 at 3:31am
in your if statement, both parts need to return the same type of data. In your example, the if is returning a string, but the else is returning...something else. They need to match.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 06 Apr 2010 at 6:58am
The bad part is that you would have to create 140 seperate formulas to replace the fields. They could all call the same formula, just passing the field value to it and returning the result.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 06 Apr 2010 at 9:20am
I was assuming that all the data types would be the same. But if they are not, then you probably would need to customize the function(s) for each data type. As far as boolean goes, is it ever 'NULL'? I have seen different data sources handle boolean differently. Other than doing some testing to see what the ISNULL function returns for each type of data value. Also with boolean values, do you want to return "N/A" if is false?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum