Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display value instead null

Status
Not open for further replies.

Hellopin

Programmer
May 14, 2004
13
US
I am trying hard using isNull, Previousisnull, CurrentFieldValue but unable to display string in database null values

i would be thankful if someone can help me

I want to display a value in reports wheredatabase value is null and if i use default null value option my summary is displayed wrong

Thnaks in advance
 
You'd be better served to supply example data and expected output.

The following formula will return "N/A" when the value is null:

If isnull({table.field})
or
trim({table.field}) ="" then
"N/A"
else
{table.field}

When you state things such as "if i use default null value option my summary is displayed wrong", include the summary you're performing, for what level, and any forumals involved.

-k
 
hi this is not working i am not able to get the value display if part is not working always else work
 
Hi,
If you really want help, please post your If..Then..Else formula and show how it is being used in a summary..

[profile]

 
I coding in DisplayString in Format

if isNull({TASKS.WOTYPE3})
or
trim({TASKS.WOTYPE3})="" then
"lall"
else
{TASKS.WOTYPE3}
please let me know where am i wrong
 
Hi Hellopin

You will NOT solve your problem that way skip the formula in the displaystring.
What you have to do is to create a brand new formula within the Field Explorer. Here the content of the formula should be:

if isNull({TASKS.WOTYPE3})
or
trim({TASKS.WOTYPE3})="" then
"lall"
else
{TASKS.WOTYPE3}

Then insert the formula into your report - not the field itself

 
If you are using that field often, an easier way to replace null values with a default is using a SQL Expression. Just create a new SQL Expression from the Field Explorer (for example let's name it "NewWOTYPE3") and type in this:

{fn IFNULL(TASKS."WOTYPE3","lall")}

Then you can use %NewWOTYPE3 in any place that you would have used {TASKS.WOTYPE3} before, and you don't have to rewrite your null value handling formula over and over.
 
I have a similar NULL problem and I tried the suggestion offered by devingm. Seems like it should work, but all my data seems to come back as "none". Here's my expression:
{fn IFNULL(EInfo."payGrade",'none')}
Did I just enter something wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top