on 01-15-2021 6:21 AM
Hi in my sub report I have a formula that looks at a number value only three for a status quite simple really so I have created the below code but when the value is null that is no number it displays open as a value. There is no vlaue and it highlights Open as a result and have no idea why this is the case. The only way I have been able to hide it is to have change the font colour to white?
if {number.Complete} = 1 then "Complete" else
if {number.Complete} = 0 then "Open" else
if {number.Complete} = 2 then "Skipped" else
if isnull ({number.Complete}) then "66" /for example
You should set the null handling drop-down in the Formula Editor to "Exceptions for Nulls". Then you need to check for Null before checking for any other value, so your formula would change to this:
if IsNull({number.Complete}) then "66" else
if {number.Complete} = 1 then "Complete" else
if {number.Complete} = 0 then "Open" else
if {number.Complete} = 2 then "Skipped"
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help! I never knew the is null had to be before " need to check for Null before checking for any other value, so your formula would change to this"
Go to File, Report Options. The first checkbox is 'Convert Database NULL values to Default'. There is also a similar option as a drop-down in the formula editor toolbar.
If you want to avoid converting numeric Null to zero, make sure those options are turned off.
Then, use IsNull() to check for Null values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.