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

Empty records in addresslabels

Status
Not open for further replies.

JanHumanitas

Technical User
Feb 14, 2008
8
NL
Hello,

We have a table with name, address, zipcode and country. We have a report that generates addresslabels. The question from the user was to show the country only when it is outside the netherlands ("LandID<>132"). Because not all LandID fields are filled, I made the following formula:

if (isnull({tblContactpersoon.Land_ID})) or {tblContactpersoon.Land_ID} = 132
then ''
else '' & {nslZorgIsGBAlandenlijst.omschrijving}

NB: "nslZorgIsGBAlandenlijst.omschrijving" returns the country (not the ID..that would be stupid)

The problem now is that if LandID IS NULL, the entire record wont be displayed. If LandID = 132 the record will be displayed (without landdescription "Nederland" as I intented).

Because the users find it obvious that a person lives in the netherlands, they leave this field empty.

Can someone help me to return the records also when LandID is NULL?

Thanx!
Jan
 
How do you know it is null? It could contain spaces or be blank, neither of which would be null.

Create a boolean formula and place it on the label:

IsNull({YourField})

See if it is returning true or false.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
You need to use a left join from nslZorgIsGBAlandenlijst to the contact person table.

-LB
 
Hello LB and dgillz, the values are null (tried IsNull({MyField})). And of course the left join solved the problem.
Thanx for your help!
Jan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top