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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null value problem 1

Status
Not open for further replies.

knulisch

Programmer
Oct 10, 2000
18
US
I have the following formula in my report in order to concatenate two fields (the wine type field will always have a value, the other designation field may not). Sometimes the field will not print any value even though there is a value in the wine type field. Am I missing something?

Thanks for your help.


stringvar x:= "";
If len({entry.entry_other_designation}) < 1
or isnull({entry.entry_other_designation})
or {entry.entry_other_designation} = &quot;&quot; then
x:= {entry.entry_wine_type}
else
x:= {entry.entry_wine_type} & &quot;, &quot; & {entry.entry_other_designation};
x;
[sig][/sig]
 
You are hitting the null here:

If len({entry.entry_other_designation}) < 1
or isnull({entry.entry_other_designation})

When you test for the null, it has to be before you use it in another part of the formula. Otherwise you are choking on the Null value before you get to the IsNull function. Reverse this pair of lines and it should work. [sig]<p>Ken Hamady- href= Reports Training by Ken Hamady</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top